#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Message Box

I just have a quick question. I have a tab called MASTER and I want to
have a message box pop up whenever someone clicks on this MASTER tab
warning them "Changing these two dates, changes all dates in the
headers of the Excel Worksheet." I believe there is a message box that
shows a circle with an X in it and I think you use +vbCritical, but I'm
not positive. Any help would be greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Message Box

Look in Excel VBA help at the msgbox command. It pretty much explains the
options.

In a module, type msgbox, highlight it and hit F1


for information on events (sheet activate event for example) see Chip
Pearson's site on events

http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy


"jdawg" wrote in message
oups.com...
I just have a quick question. I have a tab called MASTER and I want to
have a message box pop up whenever someone clicks on this MASTER tab
warning them "Changing these two dates, changes all dates in the
headers of the Excel Worksheet." I believe there is a message box that
shows a circle with an X in it and I think you use +vbCritical, but I'm
not positive. Any help would be greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Message Box

Hi

Rightclick the sheet tab, choose "view code", paste this in

Private Sub Worksheet_Activate()
MsgBox "How dare you, o deadly one !", _
vbOKOnly + vbCritical, "Kneel !"
End Sub

Alter the text to fit you needs.

HTH. Best wishes Harald

"jdawg" skrev i melding
oups.com...
I just have a quick question. I have a tab called MASTER and I want to
have a message box pop up whenever someone clicks on this MASTER tab
warning them "Changing these two dates, changes all dates in the
headers of the Excel Worksheet." I believe there is a message box that
shows a circle with an X in it and I think you use +vbCritical, but I'm
not positive. Any help would be greatly appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Message Box

Give a man fire and he will be warm the rest of the day
Set a man on fire and he will be warm the rest of his life

<g

--
Regards,
Tom Ogilvy


"Harald Staff" wrote in message
...
Hi

Rightclick the sheet tab, choose "view code", paste this in

Private Sub Worksheet_Activate()
MsgBox "How dare you, o deadly one !", _
vbOKOnly + vbCritical, "Kneel !"
End Sub

Alter the text to fit you needs.

HTH. Best wishes Harald

"jdawg" skrev i melding
oups.com...
I just have a quick question. I have a tab called MASTER and I want to
have a message box pop up whenever someone clicks on this MASTER tab
warning them "Changing these two dates, changes all dates in the
headers of the Excel Worksheet." I believe there is a message box that
shows a circle with an X in it and I think you use +vbCritical, but I'm
not positive. Any help would be greatly appreciated.





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 222
Default Message Box

For this you could set an event trigger when selecting the worksheet in
question.
Open the VB editor (Alt+F11) then double click the sheet name in Project
Explorer window. Then select Worksheet and Activate from the two drop down
boxes above the code window and enter

MsgBox "Changing these two dates changes all dates in the headers of the
Excel Worksheets", vbCritical

or just copy this

Private Sub Worksheet_Activate()
MsgBox "Changing these two dates changes all dates in the headers of the
Excel Worksheets", vbCritical
End Sub




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Message Box

"Tom Ogilvy" skrev i melding
...
Give a man fire and he will be warm the rest of the day
Set a man on fire and he will be warm the rest of his life


LOL. Thanks Tom.
Best wishes Harald


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
Pop Up Message chickalina Excel Worksheet Functions 4 July 31st 08 09:13 PM
Hello message! sekweles Excel Discussion (Misc queries) 0 September 28th 06 12:54 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
VB message JT[_2_] Excel Programming 0 September 22nd 04 02:27 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


All times are GMT +1. The time now is 07:31 PM.

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

About Us

"It's about Microsoft Excel"