Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I would like to display a message "Complete section two before entering
section one" when an excel file is opened. Any help would be appreciated. |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi Sheila,
You need to create a new macro (ALT+F11) and add a Workbook_Opened event (on the left side click on ThisWorkbook; a new window will open and in left dropdown select Workbook and Workbook_Opened will be added). Next, you just add this line (between Private Sub Workbook_Opened() and End Sub): MsgBox "Complete section two before entering section one" Message box will be displayed when document is opened. -- Best regards, Peter Jaušovec http://blog.jausovec.net http://office.jausovec.net "Sheila" je napisal: I would like to display a message "Complete section two before entering section one" when an excel file is opened. Any help would be appreciated. |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Thanks Peter this is exactly what I was looking for. Is it possible to change
the size and color of this message? "Peter Jausovec" wrote: Hi Sheila, You need to create a new macro (ALT+F11) and add a Workbook_Opened event (on the left side click on ThisWorkbook; a new window will open and in left dropdown select Workbook and Workbook_Opened will be added). Next, you just add this line (between Private Sub Workbook_Opened() and End Sub): MsgBox "Complete section two before entering section one" Message box will be displayed when document is opened. -- Best regards, Peter Jaušovec http://blog.jausovec.net http://office.jausovec.net "Sheila" je napisal: I would like to display a message "Complete section two before entering section one" when an excel file is opened. Any help would be appreciated. |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
No, unfortunately you can't change the size and color with MsgBox. But you
can create your custom form and adjust the whole appearance as you like it. Click ALT+F11 again, right click on the ThisWorkbook (on the right side) and select Insert - User form. A new, blank form will show up; then just add the label to it, adjust the font size and color. Also add a button so the user can close the form (drag&drop the button to the form, double click on it and add this line of code: Unload Me (this will unload and close the form when you click on the button). Finally, go to the Workbook_Opened event and add this line: UserForm1.Show (UserForm1 is the name of the form you created - you can change it in the properties - click on the UserForm1 and in the Properties window find the (Name) property). Hope this helps. -- Best regards, Peter Jaušovec http://blog.jausovec.net http://office.jausovec.net "Sheila" je napisal: Thanks Peter this is exactly what I was looking for. Is it possible to change the size and color of this message? "Peter Jausovec" wrote: Hi Sheila, You need to create a new macro (ALT+F11) and add a Workbook_Opened event (on the left side click on ThisWorkbook; a new window will open and in left dropdown select Workbook and Workbook_Opened will be added). Next, you just add this line (between Private Sub Workbook_Opened() and End Sub): MsgBox "Complete section two before entering section one" Message box will be displayed when document is opened. -- Best regards, Peter Jaušovec http://blog.jausovec.net http://office.jausovec.net "Sheila" je napisal: I would like to display a message "Complete section two before entering section one" when an excel file is opened. Any help would be appreciated. |
#5
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Thanks for all of your help Peter.
"Peter Jausovec" wrote: No, unfortunately you can't change the size and color with MsgBox. But you can create your custom form and adjust the whole appearance as you like it. Click ALT+F11 again, right click on the ThisWorkbook (on the right side) and select Insert - User form. A new, blank form will show up; then just add the label to it, adjust the font size and color. Also add a button so the user can close the form (drag&drop the button to the form, double click on it and add this line of code: Unload Me (this will unload and close the form when you click on the button). Finally, go to the Workbook_Opened event and add this line: UserForm1.Show (UserForm1 is the name of the form you created - you can change it in the properties - click on the UserForm1 and in the Properties window find the (Name) property). Hope this helps. -- Best regards, Peter Jaušovec http://blog.jausovec.net http://office.jausovec.net "Sheila" je napisal: Thanks Peter this is exactly what I was looking for. Is it possible to change the size and color of this message? "Peter Jausovec" wrote: Hi Sheila, You need to create a new macro (ALT+F11) and add a Workbook_Opened event (on the left side click on ThisWorkbook; a new window will open and in left dropdown select Workbook and Workbook_Opened will be added). Next, you just add this line (between Private Sub Workbook_Opened() and End Sub): MsgBox "Complete section two before entering section one" Message box will be displayed when document is opened. -- Best regards, Peter Jaušovec http://blog.jausovec.net http://office.jausovec.net "Sheila" je napisal: I would like to display a message "Complete section two before entering section one" when an excel file is opened. Any help would be appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I unlock FILE access? | Excel Discussion (Misc queries) | |||
Why does my .csv file not appear when opened in Excel? | Excel Discussion (Misc queries) | |||
file opened twice on network | Excel Discussion (Misc queries) | |||
Cannot access read-only documents. | Excel Discussion (Misc queries) | |||
Weekly Transaction Processing | Excel Worksheet Functions |