I Created an Excel macro that prompts the user to enter two cell numbers. I want to then display a msgbox back showing the cells that were entered. Problem. My msgbox shows the text in my message and instead of showing the values the user entered, it shows 'TRUE'. Any ideas?
Software/Hardware used:
Windows Vista
ASKED:
January 28, 2011 4:37 PM
UPDATED:
January 28, 2011 8:54 PM
Can you post your code, please ?
Sub FormatData()
Dim VStartRange As Range
Dim VEndRange As Range
Dim VMsg As String
‘
‘ FormatData Macro
‘
‘ Keyboard Shortcut: Ctrl+Shift+F
‘ ‘ new code starts here
‘ prompt user for data ranges
Set VStartRange = Application.InputBox _
(Prompt:=” Enter Starting cell: “, _
Title:=”Identify starting Cell ($x$999)”, _
Default:=Selection.Address, _
Type:=8)
VStartRange.Select
Set VEndRange = Application.InputBox _
(Prompt:=” Enter Last cell:”, _
Title:=”Identify Ending Cell ($x$999)”, _
Default:=Selection.Address, _
Type:=8)
VEndRange.Select
MsgBox ” Starting at ” & vbCrLf _
& VStartRange.Select & ” to ” & VEndRange.Select _
, vbInformation + vbOKOnly, “Data Range Selected”
End Sub
Try changing this:
To this: