Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default MsgBox refer to seperate worksheet

Chris,

Try it this way

Sub Message()
Dim txtScore As String
txtScore = Sheets("Calculations").Range("G2").Text
MsgBox "Your score is " & txtScore, vbInformation, " Risk Score"
End Sub


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Chris" wrote:

Hi - I need to set up a message box that will read a cell on another
worksheet. The button for the msgbox (an where I want it to pop up) is on
the Questions worsheet. The code I have is below;

Sub Message()
Dim txtScore As String

txtScore = Worksheet("Calculations").Range("G2").Select

MsgBox "Your Score is", vbInformation & txtMaturityScore, "Risk Score"

End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refer to a named range in a seperate workbook sgltaylor Excel Programming 2 December 20th 09 11:27 AM
Refer to a different worksheet Basta1980 Excel Programming 4 June 24th 09 12:58 PM
How to get evaluated value of worksheet names that do not refer to worksheet ranges? Dick Watson Excel Programming 1 December 14th 08 03:56 AM
How do I have seperate headers for seperate pages in 1 worksheet? JessicaDL Excel Discussion (Misc queries) 1 February 22nd 08 07:14 PM
Refer to seperate workbook for validation list for drop downs? Dee Excel Discussion (Misc queries) 2 March 4th 05 07:50 PM


All times are GMT +1. The time now is 06:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"