![]() |
3 option buttons, okay, cancel, NEED the form to stay up
I need some help on a form. I have 3 option buttons and an "okay" and
"cancel". If I click one of the options and "okay" it fires. If I first click cancel then it cancels. The problem is if I click one of the options and okay and it runs then the form closes. I need my form to stay up. I need to be able to process all 3 options at the users pace and then be able to close the form separately. Any hints to get me started would be appreciated. This is my first form. thanks, ----- Private Sub cmdCancel_Click() Unload Me End Sub Private Sub cmdOkay_Click() Dim nResult As Long If optCkforDupes.Value = True Then Call SSPproject.createXLdb1.deleteDateRow1 Call SSPproject.createXLdb1.CkforDupes End If If optSaveIndesign.Value = True Then Call SSPproject.saveIndesign.saveIndesign End If If optReformatDepts.Value = True Then Call SSPproject.ReformatDepts.SortDivDept Call SSPproject.ReformatDepts.HideCellsNtoX End If End Sub |
3 option buttons, okay, cancel, NEED the form to stay up
Here is one idea,
you can put falg for each process to say if it has been complete of not and when the 3 process are complete then Eg. put in your form_initialize Dim process1 as boolean Dim process2 as boolean Dim process3 as boolean ( Note if the you are calling other subs for each of the process put the Dim's in the declarations area) process1 =false process2 =false process3 = false Then at the ned of each process set the process(1or 2 or 3) =true eg: at eh end of process1 put process1=true Put this in the okay If process1.value = true & process2.value=true & process3.value =true then unload me Let me know if I misunderstood you. Steve Janis wrote: I need some help on a form. I have 3 option buttons and an "okay" and "cancel". If I click one of the options and "okay" it fires. If I first click cancel then it cancels. The problem is if I click one of the options and okay and it runs then the form closes. I need my form to stay up. I need to be able to process all 3 options at the users pace and then be able to close the form separately. Any hints to get me started would be appreciated. This is my first form. thanks, ----- Private Sub cmdCancel_Click() Unload Me End Sub Private Sub cmdOkay_Click() Dim nResult As Long If optCkforDupes.Value = True Then Call SSPproject.createXLdb1.deleteDateRow1 Call SSPproject.createXLdb1.CkforDupes End If If optSaveIndesign.Value = True Then Call SSPproject.saveIndesign.saveIndesign End If If optReformatDepts.Value = True Then Call SSPproject.ReformatDepts.SortDivDept Call SSPproject.ReformatDepts.HideCellsNtoX End If End Sub |
3 option buttons, okay, cancel, NEED the form to stay up
thanks, I'll try it!
"stevebriz" wrote: Here is one idea, you can put falg for each process to say if it has been complete of not and when the 3 process are complete then Eg. put in your form_initialize Dim process1 as boolean Dim process2 as boolean Dim process3 as boolean ( Note if the you are calling other subs for each of the process put the Dim's in the declarations area) process1 =false process2 =false process3 = false Then at the ned of each process set the process(1or 2 or 3) =true eg: at eh end of process1 put process1=true Put this in the okay If process1.value = true & process2.value=true & process3.value =true then unload me Let me know if I misunderstood you. Steve Janis wrote: I need some help on a form. I have 3 option buttons and an "okay" and "cancel". If I click one of the options and "okay" it fires. If I first click cancel then it cancels. The problem is if I click one of the options and okay and it runs then the form closes. I need my form to stay up. I need to be able to process all 3 options at the users pace and then be able to close the form separately. Any hints to get me started would be appreciated. This is my first form. thanks, ----- Private Sub cmdCancel_Click() Unload Me End Sub Private Sub cmdOkay_Click() Dim nResult As Long If optCkforDupes.Value = True Then Call SSPproject.createXLdb1.deleteDateRow1 Call SSPproject.createXLdb1.CkforDupes End If If optSaveIndesign.Value = True Then Call SSPproject.saveIndesign.saveIndesign End If If optReformatDepts.Value = True Then Call SSPproject.ReformatDepts.SortDivDept Call SSPproject.ReformatDepts.HideCellsNtoX End If End Sub |
All times are GMT +1. The time now is 02:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com