Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable in Message Box Q
I have a very simple Message Box that appears when a file is opened.
How could I have a variable referred to within this message box e.g if my text to appear in the message box was referenced to G1 in sheet "Sales"? Thanks Private Sub Workbook_Open() MsgBox "Maximise Sales for w/c 05/11/07" Range("A1").Select Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable in Message Box Q
Hi Sean -
MsgBox "Maximise Sales for " & Worksheets("Sales").Range("G1") --- Jay "Sean" wrote: I have a very simple Message Box that appears when a file is opened. How could I have a variable referred to within this message box e.g if my text to appear in the message box was referenced to G1 in sheet "Sales"? Thanks Private Sub Workbook_Open() MsgBox "Maximise Sales for w/c 05/11/07" Range("A1").Select Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable in Message Box Q
Thanks Jay, its that simple!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combined text and variable in a message box | Excel Programming | |||
object variable error message | Excel Programming | |||
Intercept/replace standard 'cell protected' message with my own message? | Excel Programming | |||
Displaying a message in a message box without requiring user to click anything to proceed | Excel Programming | |||
Message box- Assign a file name to a variable, from user input | Excel Programming |