Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialogs nc Excel Discussion (Misc queries) 1 March 23rd 05 02:17 PM
Problems with application.Dialogs(xlDialogFormulaFind).Show lydya Excel Programming 2 December 18th 04 05:02 PM
How to disable the Application Dialogs Philip Excel Programming 1 November 5th 04 08:50 PM
Dialogs Command Stratuser Excel Programming 0 February 12th 04 03:43 PM
Using Dialogs Save Stratuser[_2_] Excel Programming 0 July 22nd 03 08:59 PM


All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"