ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Create Startup Dialog (https://www.excelbanter.com/excel-discussion-misc-queries/29765-create-startup-dialog.html)

coal_miner

Create Startup Dialog
 
Greetings, I have a worksheet that I wont to have a dialog box/window popup
when someone opens it giving them directions to operate my pivotreport. How
can I do this? Can I have it so it pops up before anything else does?
Thanks in advance. Cheers

Jason Morin

You could use the workbook_open event and display a msgbox:

Sub Workbook_Open()

Dim strLine1 As String
Dim strLine2 As String
Dim strLine3 As String
Dim strLine4 As String
'Add more variables (lines) as needed
Dim strLB As String
Dim strNewRow As String

strLB = Chr(10)
strNewRow = Chr(10) & Chr(10)

'Define your message here

strLine1 = "This is an example."
strLine2 = "Please read this carefully."
strLine3 = "Click on the first sheet."
strLine4 = "Go to cell D3 and key in your name."

MsgBox strLine1 & strNewRow & strLine2 & strNewRow & _
strLine3 & strLB & strLine4

End Sub

---
To use, pres Alt+F11. Click on the ThisWorkbook Module of your current
workbook and paste in the code. Press ALT+Q. Save.

HTH
Jason
Atlanta, GA


"coal_miner" wrote:

Greetings, I have a worksheet that I wont to have a dialog box/window popup
when someone opens it giving them directions to operate my pivotreport. How
can I do this? Can I have it so it pops up before anything else does?
Thanks in advance. Cheers


Dave Peterson

You could make a userform with your notes on it.
Debra Dalgleish has some notes for userforms at:
http://www.contextures.com/xlUserForm01.html

Then create a subroutine in a general module named auto_open

Option Explicit
Sub Auto_Open()
userform1.show
end sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Auto_Open will run each time that the workbook is opened (with macros enabled).

coal_miner wrote:

Greetings, I have a worksheet that I wont to have a dialog box/window popup
when someone opens it giving them directions to operate my pivotreport. How
can I do this? Can I have it so it pops up before anything else does?
Thanks in advance. Cheers


--

Dave Peterson


All times are GMT +1. The time now is 02:50 PM.

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