ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   message box (https://www.excelbanter.com/excel-discussion-misc-queries/207147-message-box.html)

Hein

message box
 
I want a message to display on a worksheet when a file is open. The message
must contain an OK button that must be pressed by the user. On clicking the
OK button the message box must dissappear.

Can somebody please assist.
Thanks

Sheeloo[_3_]

message box
 
Open Workbook
Press Alt-F11 to open VBE editor
Click on This workbook under your workbook
Paste the following
'----------------------
Private Sub Workbook_Open()
MsgBox "Press Ok to continue", vbOK
End Sub
'-----------------------
Close VBE
Close your workbook

Open again to test...
--
Always provide your feedback so that others know whether the solution worked
or problem still persists ...


"Hein" wrote:

I want a message to display on a worksheet when a file is open. The message
must contain an OK button that must be pressed by the user. On clicking the
OK button the message box must dissappear.

Can somebody please assist.
Thanks


Sheeloo[_3_]

message box
 
If you do not want the cancel button then simple paste
Private Sub Workbook_Open()
MsgBox "Press Ok to continue"
End Sub
--
Always provide your feedback so that others know whether the solution worked
or problem still persists ...


"Hein" wrote:

I want a message to display on a worksheet when a file is open. The message
must contain an OK button that must be pressed by the user. On clicking the
OK button the message box must dissappear.

Can somebody please assist.
Thanks



All times are GMT +1. The time now is 10:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com