Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
problems with dialogs
Hello
I'm using a dialog to give easier access to macros. But when running a macro after the dialog (still open) I got a error msg if I tried to open anoter dialog like (printer dialog). How to solve this .? I have tried to use sendkeys (% F4) to close the first one but without success to close it like this. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
problems with dialogs
What dialog are you initially running for easier access to macros?
-- HTH RP (remove nothere from the email address if mailing direct) "François" wrote in message ... Hello I'm using a dialog to give easier access to macros. But when running a macro after the dialog (still open) I got a error msg if I tried to open anoter dialog like (printer dialog). How to solve this .? I have tried to use sendkeys (% F4) to close the first one but without success to close it like this. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
problems with dialogs
a custom dialog created under Excel (insert / MS 5.0 Excel Dialog)
Thannks for your help. "Bob Phillips" wrote: What dialog are you initially running for easier access to macros? -- HTH RP (remove nothere from the email address if mailing direct) "François" wrote in message ... Hello I'm using a dialog to give easier access to macros. But when running a macro after the dialog (still open) I got a error msg if I tried to open anoter dialog like (printer dialog). How to solve this .? I have tried to use sendkeys (% F4) to close the first one but without success to close it like this. Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
problems with dialogs
I feared that might be what you were using. I don't know why you get the
problem since it is many years since I have used the MS 5.0 Excel Dialog. Could you not create a use3rform for you macro initiation rather than this old dialog? -- HTH RP (remove nothere from the email address if mailing direct) "François" wrote in message ... a custom dialog created under Excel (insert / MS 5.0 Excel Dialog) Thannks for your help. "Bob Phillips" wrote: What dialog are you initially running for easier access to macros? -- HTH RP (remove nothere from the email address if mailing direct) "François" wrote in message ... Hello I'm using a dialog to give easier access to macros. But when running a macro after the dialog (still open) I got a error msg if I tried to open anoter dialog like (printer dialog). How to solve this .? I have tried to use sendkeys (% F4) to close the first one but without success to close it like this. Thanks. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
problems with dialogs
insert / MS 5.0 Excel Dialog inserts a dialogsheet. The code you post all
the time (and modify all the time) is based on the dialogsheet. What do you interpret him to be talking about? -- Regards, Tom Ogilvy "Bob Phillips" wrote in message ... I feared that might be what you were using. I don't know why you get the problem since it is many years since I have used the MS 5.0 Excel Dialog. Could you not create a use3rform for you macro initiation rather than this old dialog? -- HTH RP (remove nothere from the email address if mailing direct) "François" wrote in message ... a custom dialog created under Excel (insert / MS 5.0 Excel Dialog) Thannks for your help. "Bob Phillips" wrote: What dialog are you initially running for easier access to macros? -- HTH RP (remove nothere from the email address if mailing direct) "François" wrote in message ... Hello I'm using a dialog to give easier access to macros. But when running a macro after the dialog (still open) I got a error msg if I tried to open anoter dialog like (printer dialog). How to solve this .? I have tried to use sendkeys (% F4) to close the first one but without success to close it like this. Thanks. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
problems with dialogs
I don't think you can run an Application.Dialog at same time as your Dialog
form. Try OnTime method: '// in a normal module '// from Forms toolbar, put a button on Dialog1 and '// assign it to BtnPrint Public Arg Sub Main() ThisWorkbook.DialogSheets("Dialog1").Show End Sub Sub ReShowMyDialog(Optional n As Long) 'whatever initialization code If n = 123 Then MsgBox "User cancelled print dialog" 'If IsArray(Arg) Then Erase Arg End If Main End Sub Sub BtnPrint() Dim j As Long Arg = Array(2, 1, 2) '(Page(s), From 1, To 2) j = 123 Application.OnTime Now, " 'PrintShow " & j & " ' " ThisWorkbook.DialogSheets("Dialog1").Hide End Sub Sub PrintShow(Optional num As Long) Dim x x = Application.Dialogs(xlDialogPrint).Show(Arg(0), Arg(1), Arg(2)) If x = False And num = 123 Then ReShowMyDialog num Else: Erase Arg End If End Sub Regards, Peter T "François" wrote in message ... a custom dialog created under Excel (insert / MS 5.0 Excel Dialog) Thannks for your help. "Bob Phillips" wrote: What dialog are you initially running for easier access to macros? -- HTH RP (remove nothere from the email address if mailing direct) "François" wrote in message ... Hello I'm using a dialog to give easier access to macros. But when running a macro after the dialog (still open) I got a error msg if I tried to open anoter dialog like (printer dialog). How to solve this .? I have tried to use sendkeys (% F4) to close the first one but without success to close it like this. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dialogs | Excel Discussion (Misc queries) | |||
Problems with application.Dialogs(xlDialogFormulaFind).Show | Excel Programming | |||
How to disable the Application Dialogs | Excel Programming | |||
Dialogs Command | Excel Programming | |||
Using Dialogs Save | Excel Programming |