Creating popup/prompt

lkjing

Board Regular
Joined
Jan 27, 2005
Messages
111
Hi does anyone know how to create popup/prompt when opening an excel file? Thanks!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Thanks for the prompt reply! How do I go about doing it? Would you be able to list the steps?
 
Upvote 0
open your worksbook

click alt + F11 to open the VB Window

In the top left (Project window), double click "this workbook"

from the resulting dropdown boxes, select "workbook" and "open"

paste in the code

save

close

open again...
 
Upvote 0
Private Sub Workbook_Open(msgbox "Hello")

End Sub

is this the correct way to do it? I tried it but it did not work..
 
Upvote 0
Code:
Private Sub Workbook_Open()
MsgBox "Hello"
End Sub
 
Upvote 0
Thanks...I did a successful run within the editor but the popup doesnt appear when I opened the file?
 
Upvote 0
When you are in the visual editor, you have to put the code in "This Workbook"

texasalynn
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top