Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save As dialog box keeps popping up and won't close | Excel Discussion (Misc queries) | |||
Automatically Close Dialog Boxes | Excel Worksheet Functions | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel | |||
Close file without Save Changes dialog box | Excel Programming |