Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up Window 1

Status
Not open for further replies.

wec43wec

Technical User
Aug 6, 2005
226
US
How can I create a pop-up window each time I open an Excel file?

Thanks
 
You could add your code for the popup menu to the Workbook Open event. You need to minimize the workbook, right click on the title bar, click on View Code. Select Workbook Open event.
 
BenRow,

It appears that the open event asked for written code in VBA. Are you able to provide an example - pop-up code could read "test pop-up code".

Thanks
 
Following code produces message box with your suggested words:

msgbox("Test pop-up code")

What are you trying to do with this pop-up window?
 
BenRowe - I am attempting to issue instructions each time the users opens the file.
 
Why not just put all the instructions on a single worksheet and have the code simply activate that worksheet on opening?

That having been said, for what you actually asked, in the VBE, go into the ThisWorkbook module and paste in the following code and then edit as you wish:-

Code:
Private Sub Workbook_Open()
MsgBox "Now listen here you muppets:-" & vbCrLf & _
           "1) - Do abc" & vbCrLf & _
           "2) - Do cde" & vbCrLf & _
           "3) - Do def" & vbCrLf & _
           "4) - Do xyz" & vbCrLf & vbCrLf & _
           "Having done all that, you now need to:-" & vbCrLf & _
           "5) - Do 123" & vbCrLf & _
           "6) - Do 234" & vbCrLf & _
           "7) - Do 345" & vbCrLf & _
           "8) - Do 456" & vbCrLf & vbCrLf & _
           "That's it - You should now be OK!!!!"
End Sub

Run it and you will see that the vbCrlf gives you a line break, and the double vbCrlf gives you two of them, so you can space things out nicely if you want to.

Each section of text needs to be enclosed in quotes, and the _ bit at the end of each line tells Excel that the instruction continues on the next line.

Regards
Ken................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top