Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Variable in Message Box Q

Thanks Jay, its that simple!


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
Combined text and variable in a message box [email protected] Excel Programming 3 September 27th 07 03:31 PM
object variable error message Pops Jackson Excel Programming 6 April 12th 06 10:41 PM
Intercept/replace standard 'cell protected' message with my own message? KR Excel Programming 3 March 16th 06 02:31 PM
Displaying a message in a message box without requiring user to click anything to proceed Android[_2_] Excel Programming 2 June 25th 04 06:44 PM
Message box- Assign a file name to a variable, from user input Sea Excel Programming 2 June 22nd 04 04:55 PM


All times are GMT +1. The time now is 02:37 AM.

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"