Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a workbook with 3 worksheets in it. The worksheets are named -
Meat-Page 1, Meat-Page 2, Cheese. When the workbook is opened an automatic pop-up message box appears. The workbook is always opened to the first tab (Meat-Page 1). Is there a way that if the user changes to Tab 2 (Meat-Page 2) the pop-up message appears again by just switching tabs? I want to make this workbook idiot proof which I am finding out is not easy. Thanks for the help. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In the worksheet code area of each sheet, include the following event macro:
Private Sub Worksheet_Activate() MsgBox ("This is your complementary message:" & Chr(10) & "You look great today!") End Sub -- Gary''s Student - gsnu200826 "patsy" wrote: I have a workbook with 3 worksheets in it. The worksheets are named - Meat-Page 1, Meat-Page 2, Cheese. When the workbook is opened an automatic pop-up message box appears. The workbook is always opened to the first tab (Meat-Page 1). Is there a way that if the user changes to Tab 2 (Meat-Page 2) the pop-up message appears again by just switching tabs? I want to make this workbook idiot proof which I am finding out is not easy. Thanks for the help. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi
would have been helpful if you had posted more like the code used to open ect but vaguely... you can use the worksheet_Activate event to cause a message to pop up. Private Sub Worksheet_Activate() MsgBox "this is a pop up message" End Sub regards FSt1 "patsy" wrote: I have a workbook with 3 worksheets in it. The worksheets are named - Meat-Page 1, Meat-Page 2, Cheese. When the workbook is opened an automatic pop-up message box appears. The workbook is always opened to the first tab (Meat-Page 1). Is there a way that if the user changes to Tab 2 (Meat-Page 2) the pop-up message appears again by just switching tabs? I want to make this workbook idiot proof which I am finding out is not easy. Thanks for the help. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
No such thing as idiot-proof. Idiot's are too ingenious...
Assuming you're using the Workbook_Open() event to fire your message box, you can use the workbook's Workbook_SheetActivate() event or each individual sheet's Sheet_Activate() event as well. In article , patsy wrote: I have a workbook with 3 worksheets in it. The worksheets are named - Meat-Page 1, Meat-Page 2, Cheese. When the workbook is opened an automatic pop-up message box appears. The workbook is always opened to the first tab (Meat-Page 1). Is there a way that if the user changes to Tab 2 (Meat-Page 2) the pop-up message appears again by just switching tabs? I want to make this workbook idiot proof which I am finding out is not easy. Thanks for the help. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Open the VBA editor (Alt+F11).
Find your code that you have previously entered (probably on the ThisWorkbook sheet) Change it to: Private Sub Workbook_SheetActivate(ByVal Sh As Object) MsgBox "Your message goes here" End Sub -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "patsy" wrote: I have a workbook with 3 worksheets in it. The worksheets are named - Meat-Page 1, Meat-Page 2, Cheese. When the workbook is opened an automatic pop-up message box appears. The workbook is always opened to the first tab (Meat-Page 1). Is there a way that if the user changes to Tab 2 (Meat-Page 2) the pop-up message appears again by just switching tabs? I want to make this workbook idiot proof which I am finding out is not easy. Thanks for the help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Strange Message when opening workbook | Excel Discussion (Misc queries) | |||
how can I create a pop-up message whenever a workbook is opened? | Excel Discussion (Misc queries) | |||
Shared Workbook Start Up Message | Setting up and Configuration of Excel | |||
Can I add a pop-up message that will show when a workbook opens | Excel Discussion (Misc queries) | |||
can i have a pop up reminder message when i open a workbook? | New Users to Excel |