ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MsgBox refer to seperate worksheet (https://www.excelbanter.com/excel-programming/443130-msgbox-refer-seperate-worksheet.html)

Chris

MsgBox refer to seperate worksheet
 
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

Don Guillett[_3_]

MsgBox refer to seperate worksheet
 
Sub msgboxfromothersheet()
MsgBox "Your score is " & sheets("Calculations").Range("G2")
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Chris" wrote in message
...
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




All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com