Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Sheila
 
Posts: n/a
Default Display a message when a file is opened.

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   Report Post  
Posted to microsoft.public.excel.newusers
Peter Jausovec
 
Posts: n/a
Default Display a message when a file is opened.

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   Report Post  
Posted to microsoft.public.excel.newusers
Sheila
 
Posts: n/a
Default Display a message when a file is opened.

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   Report Post  
Posted to microsoft.public.excel.newusers
Peter Jausovec
 
Posts: n/a
Default Display a message when a file is opened.

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   Report Post  
Posted to microsoft.public.excel.newusers
Sheila
 
Posts: n/a
Default Display a message when a file is opened.

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
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
How do I unlock FILE access? rcmodelr Excel Discussion (Misc queries) 7 November 12th 05 09:55 PM
Why does my .csv file not appear when opened in Excel? Puzzled Excel Discussion (Misc queries) 1 November 2nd 05 02:01 PM
file opened twice on network stevenmorrison Excel Discussion (Misc queries) 1 October 25th 05 03:44 PM
Cannot access read-only documents. tomgillane Excel Discussion (Misc queries) 14 February 7th 05 10:53 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM


All times are GMT +1. The time now is 11:25 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"