ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto run dialog box? Please Help! (https://www.excelbanter.com/excel-programming/358064-auto-run-dialog-box-please-help.html)

Jamie13

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


--
Jamie13
------------------------------------------------------------------------
Jamie13's Profile: http://www.excelforum.com/member.php...o&userid=33175
View this thread: http://www.excelforum.com/showthread...hreadid=529952


Norman Jones

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" wrote in
message ...

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




Jamie13[_2_]

Auto run dialog box? Please Help!
 

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


Norman Jones

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" wrote in
message ...

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




Norman Jones

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" wrote in
message ...

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




Jamie13[_3_]

Auto run dialog box? Please Help!
 

Hi Norman thanks for your quick response,

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

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

--
Jamie1
-----------------------------------------------------------------------
Jamie13's Profile: http://www.excelforum.com/member.php...fo&userid=3317
View this thread: http://www.excelforum.com/showthread.php?threadid=52995


Norman Jones

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" wrote in
message ...

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




Jamie13[_4_]

Auto run dialog box? Please Help!
 

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


Norman Jones

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 procedu

'=============
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" wrote in
message ...

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





All times are GMT +1. The time now is 06:17 PM.

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