How to accept user input and display the value in Excel 2007 macros

355 pts.
Tags:
Excel 2007
Excel 2007 functions
Excel 2007 macros
Excell 2007
Macros
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

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Can you post your code, please ?
    65,110 pointsBadges:
    report
  • jkeri
    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
    355 pointsBadges:
    report
  • carlosdl
    Try changing this:
    MsgBox ” Starting at ” & vbCrLf _
    & VStartRange.Select & ” to ” & VEndRange.Select _
    , vbInformation + vbOKOnly, “Data Range Selected”
    To this:
    MsgBox " Starting at " & vbCrLf _
    & VStartRange.Address & " to " & VEndRange.Address _
    , vbInformation + vbOKOnly, "Data Range Selected"
    65,110 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following