+ Reply to Thread
Results 1 to 9 of 9

Auto run dialog box? Please Help!

  1. #1
    Registered User
    Join Date
    04-05-2006
    Posts
    7

    Exclamation Auto run dialog box? Please Help!

    Hi there,

    I have created a new dialog box worksheet which I want to use as an index point for multiple worksheets in the same book. I have created the various macros for each click of a different button.

    The PROBLEM!......

    How do I get this dialog box to automatically pop up and run when someone opens the excel workbook or returns to that particular worksheet? I dont want to press the run button everytime someone opens it. I know it proberly a really simple solution but I haven't got a clue.

    Many Thanks

    J

  2. #2
    Norman Jones
    Guest

    Re: Auto run dialog box? Please Help!

    Hi Jamie,

    Try:

    '=============>>
    Private Sub Workbook_Open()
    Me.Sheets("iMySheet1").Select '<<==== CHANGE
    End Sub
    '<<=============

    This is workbook event code and should be pasted into the workbook's
    ThisWorkbook module *not* a standard module or a sheet module:

    Right-click the Excel icon on the worksheet
    (or the icon to the left of the File menu if your workbook is maximised)

    Select 'View Code' from the menu and paste the code.
    Alt-F11 to return to Excel.

    Change MySheet to reflect the name of the sheet of interest.

    ---
    Regards,
    Norman



    "Jamie13" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi there,
    >
    > I have created a new dialog box worksheet which I want to use as an
    > index point for multiple worksheets in the same book. I have created
    > the various macros for each click of a different button.
    >
    > The PROBLEM!......
    >
    > How do I get this dialog box to automatically pop up and run when
    > someone opens the excel workbook or returns to that particular
    > worksheet? I dont want to press the run button everytime someone opens
    > it. I know it proberly a really simple solution but I haven't got a
    > clue.
    >
    > Many Thanks
    >
    > J
    >
    >
    > --
    > Jamie13
    > ------------------------------------------------------------------------
    > Jamie13's Profile:
    > http://www.excelforum.com/member.php...o&userid=33175
    > View this thread: http://www.excelforum.com/showthread...hreadid=529952
    >




  3. #3
    Registered User
    Join Date
    04-05-2006
    Posts
    7

    Thanks

    Hey Norman Thanks, I have done this however it still doesn't auto load the "run the dialog box" when the excel workbook is opened. This is my main aim! Any more help would be greatly appreciated!

    Thank you!

  4. #4
    Norman Jones
    Guest

    Re: Auto run dialog box? Please Help!

    Hi Jamie,

    I am not sure what "run the dialog box" means!

    If you want to activate a specific sheet each time that the workbook is
    opened, try the suggested code.

    If you want to run a specific macro each time that the workbook is opened,
    try something like:

    '=============>>
    Private Sub Workbook_Open()
    Call MyMacro '<<==== CHANGE
    End Sub
    '<<=============

    If this does not assist, please explain in more detail your intentions.

    ---
    Regards,
    Norman



    "Jamie13" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hey Norman Thanks, I have done this however it still doesn't auto load
    > the "run the dialog box" when the excel workbook is opened. This is my
    > main aim! Any more help would be greatly appreciated!
    >
    > Thank you!
    >
    >
    > --
    > Jamie13
    > ------------------------------------------------------------------------
    > Jamie13's Profile:
    > http://www.excelforum.com/member.php...o&userid=33175
    > View this thread: http://www.excelforum.com/showthread...hreadid=529952
    >




  5. #5
    Norman Jones
    Guest

    Re: Auto run dialog box? Please Help!

    Hi Jamie,

    If you have inserted an Excel 5 dialog sheet, try:

    '=============>>
    Private Sub Workbook_Open()

    DialogSheets("Dialog1").Show
    End Sub
    '<<=============

    Change Dialog1 to the name of the dialog sheet.


    ---
    Regards,
    Norman



    "Jamie13" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hey Norman Thanks, I have done this however it still doesn't auto load
    > the "run the dialog box" when the excel workbook is opened. This is my
    > main aim! Any more help would be greatly appreciated!
    >
    > Thank you!
    >
    >
    > --
    > Jamie13
    > ------------------------------------------------------------------------
    > Jamie13's Profile:
    > http://www.excelforum.com/member.php...o&userid=33175
    > View this thread: http://www.excelforum.com/showthread...hreadid=529952
    >




  6. #6
    Registered User
    Join Date
    04-05-2006
    Posts
    7

    Norman

    Hi Norman thanks for your quick response,

    I am using excel 2003 and after right clicking on a tab at the bottom of the screen I have inserted an MS EXCEL 5.0 Dialog box, inserted some buttons and some text and assigned macros to the buttons telling it to change pages on each click. I want this dialog box to "run" in real time when the workbook has been opened.

    It is on a seperate sheet and currently only opens in a design view meaing that who ever views this worksheet will have to press the "run dialog box" in the forms panel.

  7. #7
    Norman Jones
    Guest

    Re: Auto run dialog box? Please Help!

    Hi Jamie,

    Try;

    '=============>>
    Private Sub Workbook_Open()
    DialogSheets("Dialog1").Show
    End Sub
    '<<=============

    Change Dialog1 to the name of the dialog sheet.

    ---
    Regards,
    Norman



    "Jamie13" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Norman thanks for your quick response,
    >
    > I am using excel 2003 and after right clicking on a tab at the bottom
    > of the screen I have inserted an MS EXCEL 5.0 Dialog box, inserted some
    > buttons and some text and assigned macros to the buttons telling it to
    > change pages on each click. I want this dialog box to "run" in real
    > time when the workbook has been opened.
    >
    > It is on a seperate sheet and currently only opens in a design view
    > meaing that who ever views this worksheet will have to press the "run
    > dialog box" in the forms panel.
    >
    >
    > --
    > Jamie13
    > ------------------------------------------------------------------------
    > Jamie13's Profile:
    > http://www.excelforum.com/member.php...o&userid=33175
    > View this thread: http://www.excelforum.com/showthread...hreadid=529952
    >




  8. #8
    Registered User
    Join Date
    04-05-2006
    Posts
    7
    Hey Norman cheers mate,
    That's worked brilliant! The only thing is when I go back to the "contents page" it doesn't pop up again!

  9. #9
    Norman Jones
    Guest

    Re: Auto run dialog box? Please Help!

    Hi Jamie,

    > That's worked brilliant! The only thing is when I go back to the
    > "contents page" it doesn't pop up again!


    In the ThisWorkbook module, paste this additional procedure:

    '=============>>
    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    If Sh.Name = "Dialog1" Then
    DialogSheets("Dialog1").Show
    End If
    End Sub
    '<<=============

    Again, change "Dialog1" to the name that you use.


    ---
    Regards,
    Norman



    "Jamie13" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hey Norman cheers mate,
    > That's worked brilliant! The only thing is when I go back to the
    > "contents page" it doesn't pop up again!
    >
    >
    > --
    > Jamie13
    > ------------------------------------------------------------------------
    > Jamie13's Profile:
    > http://www.excelforum.com/member.php...o&userid=33175
    > View this thread: http://www.excelforum.com/showthread...hreadid=529952
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1