#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Autostart Macro

I would like a simple text box or message to appear when a spreadsheet is
first opened that will require the user to push OK.

What I actually want is a box to pop up as sson as the spreadsheet is opened
that says "Only enter data in cells that are color coded Tan!" I would like
the message to stay on the screen until the uses clicks an OK button.

How would I accomplish this?

Thanks,

Ken
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Autostart Macro

Press Alt+F11 and in the project explorer on the left of the screen, double
click ThisWorkbook to open the workbook module.

Place something similar to the following code in the Workbook's On Open event.

Private Sub Workbook_Open()

MsgBox "Only enter data in the cells w/tan color."

End Sub
--
Kevin Backmann


"McCloudK" wrote:

I would like a simple text box or message to appear when a spreadsheet is
first opened that will require the user to push OK.

What I actually want is a box to pop up as sson as the spreadsheet is opened
that says "Only enter data in cells that are color coded Tan!" I would like
the message to stay on the screen until the uses clicks an OK button.

How would I accomplish this?

Thanks,

Ken

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Autostart Macro

This goes in a General module--not behind a worksheet, not behind ThisWorkbook.

Option Explicit
Sub Auto_Open()
Msgbox "Only enter data in cells that are color coded Tan!"
End Sub



McCloudK wrote:

I would like a simple text box or message to appear when a spreadsheet is
first opened that will require the user to push OK.

What I actually want is a box to pop up as sson as the spreadsheet is opened
that says "Only enter data in cells that are color coded Tan!" I would like
the message to stay on the screen until the uses clicks an OK button.

How would I accomplish this?

Thanks,

Ken


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Autostart Macro

Hi Dave ,
could you please help me how to enter text in two lines of message box ?
and how to change font properties colour etc...


"Dave Peterson" wrote:

This goes in a General module--not behind a worksheet, not behind ThisWorkbook.

Option Explicit
Sub Auto_Open()
Msgbox "Only enter data in cells that are color coded Tan!"
End Sub



McCloudK wrote:

I would like a simple text box or message to appear when a spreadsheet is
first opened that will require the user to push OK.

What I actually want is a box to pop up as sson as the spreadsheet is opened
that says "Only enter data in cells that are color coded Tan!" I would like
the message to stay on the screen until the uses clicks an OK button.

How would I accomplish this?

Thanks,

Ken


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Autostart Macro

You can't change the font properties in a plain old msgbox. But you could
design your own userform and do as much customization as you want:

Option Explicit
Sub Auto_Open()
Msgbox "Only enter data in cells" & vblf & "that are color coded Tan!"
'or
Msgbox "Only enter data in cells" & vbnewline & "that are color coded Tan!"
End Sub

In the windows world, vblf (linefeed) is sufficient.

If you have to support both Wintel and Mac's, you may want to use vbnewline.
That constant is smart enough to know what to use on each.

Narasimha wrote:

Hi Dave ,
could you please help me how to enter text in two lines of message box ?
and how to change font properties colour etc...

"Dave Peterson" wrote:

This goes in a General module--not behind a worksheet, not behind ThisWorkbook.

Option Explicit
Sub Auto_Open()
Msgbox "Only enter data in cells that are color coded Tan!"
End Sub



McCloudK wrote:

I would like a simple text box or message to appear when a spreadsheet is
first opened that will require the user to push OK.

What I actually want is a box to pop up as sson as the spreadsheet is opened
that says "Only enter data in cells that are color coded Tan!" I would like
the message to stay on the screen until the uses clicks an OK button.

How would I accomplish this?

Thanks,

Ken


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Autostart Macro

Thank you Dave .

"Dave Peterson" wrote:

You can't change the font properties in a plain old msgbox. But you could
design your own userform and do as much customization as you want:

Option Explicit
Sub Auto_Open()
Msgbox "Only enter data in cells" & vblf & "that are color coded Tan!"
'or
Msgbox "Only enter data in cells" & vbnewline & "that are color coded Tan!"
End Sub

In the windows world, vblf (linefeed) is sufficient.

If you have to support both Wintel and Mac's, you may want to use vbnewline.
That constant is smart enough to know what to use on each.

Narasimha wrote:

Hi Dave ,
could you please help me how to enter text in two lines of message box ?
and how to change font properties colour etc...

"Dave Peterson" wrote:

This goes in a General module--not behind a worksheet, not behind ThisWorkbook.

Option Explicit
Sub Auto_Open()
Msgbox "Only enter data in cells that are color coded Tan!"
End Sub



McCloudK wrote:

I would like a simple text box or message to appear when a spreadsheet is
first opened that will require the user to push OK.

What I actually want is a box to pop up as sson as the spreadsheet is opened
that says "Only enter data in cells that are color coded Tan!" I would like
the message to stay on the screen until the uses clicks an OK button.

How would I accomplish this?

Thanks,

Ken

--

Dave Peterson


--

Dave Peterson

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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
Autostart Alias Excel Discussion (Misc queries) 2 December 8th 05 02:43 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


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