Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2k
I have two forms (Form1 & form2). Form 1 has code within it that checks various cells in a worksheet. I have some validation within where if the cell value < "" then Form2 pops up and asks whether the user is sure that they want to continue and update the worksheet. If they click on yes, the worksheet appears. If they choose "No", I want the code to resume in Form1. Although I knows it not good practice to use the Goto command, its the only solution I could think off but I can't get it to work. Any help avaliable?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim,
you could try this... Have the update code in Form1, and the main control logic there, so that it is always the one that is really in control. on Form2, have an invisible label, called lblCancel. Code structure then looks like this Sub Main Form1.Show End Sub In Form1 code cmdDoSomething_Click Me.Hide Form2.Show If Form2.lblCancel.Caption = "TRUE" then Unload Form2 Else 'do something Unload Form2 End If End Sub In Form2 code cmdCancel_Click lblCancel.Caption = "TRUE" me.hide End Sub cmdOK_Click me.hide End Sub Robin Hammond www.enhanceddatasystems.com "JimPNicholls" wrote in message ... Excel 2k I have two forms (Form1 & form2). Form 1 has code within it that checks various cells in a worksheet. I have some validation within where if the cell value < "" then Form2 pops up and asks whether the user is sure that they want to continue and update the worksheet. If they click on yes, the worksheet appears. If they choose "No", I want the code to resume in Form1. Although I knows it not good practice to use the Goto command, its the only solution I could think off but I can't get it to work. Any help avaliable?? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
put code behind form2 to open form1 and close form2
-----Original Message----- Excel 2k I have two forms (Form1 & form2). Form 1 has code within it that checks various cells in a worksheet. I have some validation within where if the cell value < "" then Form2 pops up and asks whether the user is sure that they want to continue and update the worksheet. If they click on yes, the worksheet appears. If they choose "No", I want the code to resume in Form1. Although I knows it not good practice to use the Goto command, its the only solution I could think off but I can't get it to work. Any help avaliable?? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
command code ( GOTO command) in formula | New Users to Excel | |||
Goto code | Excel Discussion (Misc queries) | |||
USING A GOTO COMMAND IN EXCEL | Excel Worksheet Functions | |||
search or goto command needed. | Excel Programming | |||
How can I still go to the error-code after a On Error Goto? | Excel Programming |