From: Mike H on 7 Jun 2010 05:42 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
From: Don Guillett on 7 Jun 2010 08:09 Sub msgboxfromothersheet() MsgBox "Your score is " & sheets("Calculations").Range("G2") End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett(a)gmail.com "Chris" <Chris(a)discussions.microsoft.com> wrote in message news:54E7DC6E-CBF3-4AF0-BABD-A42CEE82363C(a)microsoft.com... > 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
|
Pages: 1 Prev: Environ("username") in 2007 Next: MsgBox refer to seperate worksheet |