Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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



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
Option Buttons in a Form Idaho Word Man Excel Discussion (Misc queries) 7 April 21st 08 09:58 PM
Creating a form with option buttons Jon[_21_] Excel Programming 3 April 15th 06 03:15 AM
option buttons in a form raw[_11_] Excel Programming 0 November 11th 05 10:05 PM
User Form Option & Command Buttons Information Hog[_2_] Excel Programming 1 August 19th 05 10:00 PM
Form Option Buttons and Combo Boxes in VBA Newboy18 Excel Programming 1 June 30th 04 10:16 PM


All times are GMT +1. The time now is 05:38 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"