Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Close dialog box

I have one dialog box with several options on it. After you fill in the
required information you hit a "Continue" button, which takes you to another
dialog box. Everything works great except the first dialog box won't close
when the second one opens. Any suggestions on how to do this. Everything I
try doesn't work!
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Close dialog box

without your code...

when the Continue button is clicked on, the code should
show the next form modeless, and the following code
should be the unload method...

userform1 has the button. the button, btnContinue will
show the next form, userform2...

Private Sub btnContinue_Click()
Me.Hide
UserForm2.Show vbModeless
Unload Me
End Sub


Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
I have one dialog box with several options on it. After

you fill in the
required information you hit a "Continue" button, which

takes you to another
dialog box. Everything works great except the first

dialog box won't close
when the second one opens. Any suggestions on how to do

this. Everything I
try doesn't work!
Thanks
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Close dialog box

I am not using a userform (what is the advantage of doing so?) I have simply
inserted a dialog box and customized it (which has been working very well for
me so far). So from one dialog box I want to call another and close the first
one when you hit the "continue" button I have created. Here is the code for
my "continue" button.

Sub Button2_Click()

'SOLD TO
'Builder Name
Sheets("Email page").Cells(3, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 8").Text
'Builder Telephone
Sheets("Email page").Cells(4, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 9").Text
'Builder Fax
Sheets("Email page").Cells(5, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 10").Text
'Builder E-mail
Sheets("Email page").Cells(6, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 11").Text

'SHIP TO
'Street
Sheets("Email page").Cells(3, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 16").Text
'City
Sheets("Email page").Cells(4, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 19").Text
'State
Sheets("Email page").Cells(5, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 21").Text
'Zip
Sheets("Email page").Cells(5, 8).Value =
DialogSheets("Info").EditBoxes("Edit Box 23").Text
'Telephone
Sheets("Email page").Cells(6, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 25").Text


'Close Info
DialogSheets("Info").Hide
Unload DialogSheets("Info")

'Call Choice 1
DialogSheets("Choice 1").Show


End Sub

I can not get the first dialog box to close if I call the second.

"Patrick Molloy" wrote:

without your code...

when the Continue button is clicked on, the code should
show the next form modeless, and the following code
should be the unload method...

userform1 has the button. the button, btnContinue will
show the next form, userform2...

Private Sub btnContinue_Click()
Me.Hide
UserForm2.Show vbModeless
Unload Me
End Sub


Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
I have one dialog box with several options on it. After

you fill in the
required information you hit a "Continue" button, which

takes you to another
dialog box. Everything works great except the first

dialog box won't close
when the second one opens. Any suggestions on how to do

this. Everything I
try doesn't work!
Thanks
.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Close dialog box

try calling another macro with Ontime - the other macro shows the dialog

Sub Button2_Click()

'SOLD TO
'Builder Name
Sheets("Email page").Cells(3, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 8").Text
'Builder Telephone
Sheets("Email page").Cells(4, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 9").Text
'Builder Fax
Sheets("Email page").Cells(5, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 10").Text
'Builder E-mail
Sheets("Email page").Cells(6, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 11").Text

'SHIP TO
'Street
Sheets("Email page").Cells(3, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 16").Text
'City
Sheets("Email page").Cells(4, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 19").Text
'State
Sheets("Email page").Cells(5, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 21").Text
'Zip
Sheets("Email page").Cells(5, 8).Value =
DialogSheets("Info").EditBoxes("Edit Box 23").Text
'Telephone
Sheets("Email page").Cells(6, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 25").Text


'Close Info
DialogSheets("Info").Hide
Unload DialogSheets("Info")

'Call Choice 1
'DialogSheets("Choice 1").Show
Application.OnTime now, "ShowChoice"

End Sub

Private Sub ShowChoice()
DialogSheets("Choice 1").Show
End Sub

--
Regards,
Tom Ogilvy


"Web_Builder" wrote in message
...
I am not using a userform (what is the advantage of doing so?) I have

simply
inserted a dialog box and customized it (which has been working very well

for
me so far). So from one dialog box I want to call another and close the

first
one when you hit the "continue" button I have created. Here is the code

for
my "continue" button.

Sub Button2_Click()

'SOLD TO
'Builder Name
Sheets("Email page").Cells(3, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 8").Text
'Builder Telephone
Sheets("Email page").Cells(4, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 9").Text
'Builder Fax
Sheets("Email page").Cells(5, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 10").Text
'Builder E-mail
Sheets("Email page").Cells(6, 2).Value =
DialogSheets("Info").EditBoxes("Edit Box 11").Text

'SHIP TO
'Street
Sheets("Email page").Cells(3, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 16").Text
'City
Sheets("Email page").Cells(4, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 19").Text
'State
Sheets("Email page").Cells(5, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 21").Text
'Zip
Sheets("Email page").Cells(5, 8).Value =
DialogSheets("Info").EditBoxes("Edit Box 23").Text
'Telephone
Sheets("Email page").Cells(6, 6).Value =
DialogSheets("Info").EditBoxes("Edit Box 25").Text


'Close Info
DialogSheets("Info").Hide
Unload DialogSheets("Info")

'Call Choice 1
DialogSheets("Choice 1").Show


End Sub

I can not get the first dialog box to close if I call the second.

"Patrick Molloy" wrote:

without your code...

when the Continue button is clicked on, the code should
show the next form modeless, and the following code
should be the unload method...

userform1 has the button. the button, btnContinue will
show the next form, userform2...

Private Sub btnContinue_Click()
Me.Hide
UserForm2.Show vbModeless
Unload Me
End Sub


Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
I have one dialog box with several options on it. After

you fill in the
required information you hit a "Continue" button, which

takes you to another
dialog box. Everything works great except the first

dialog box won't close
when the second one opens. Any suggestions on how to do

this. Everything I
try doesn't work!
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
Save As dialog box keeps popping up and won't close John Excel Discussion (Misc queries) 2 June 18th 07 12:29 PM
Automatically Close Dialog Boxes chriskane Excel Worksheet Functions 2 August 9th 05 12:14 PM
Excel shoud not close all active books when clicking close button technomike Excel Discussion (Misc queries) 0 June 10th 05 05:35 PM
excel - Windows close button (x) should only close active workboo. CoffeeAdict Setting up and Configuration of Excel 3 February 8th 05 04:30 AM
Close file without Save Changes dialog box flumpf Excel Programming 1 October 24th 03 02:38 AM


All times are GMT +1. The time now is 12:55 PM.

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

About Us

"It's about Microsoft Excel"