lehgzil
10-04-2010, 08:07 PM
gud day/evening to everyone again,
now i switched focused to userforms, what i am doing right now is linking userforms with basic controls inside, what i have is 3 userforms on which when the 1st was filled the user clicks NEXT button and then goes to 2nd then again on 3rd. 2nd and 3rd userforms has a BACK button on which loads the previous userforms(if 3rd back then show 2nd, 2nd then show 1st)
well my code do pretty well on that.
i use unload Me for back button and Userform.show on Next button.
yet my problem is on the third userform on which i have the ok button which should closes/unloads all the userforms.
i have a work around on which the ok button is on the 1st userform and that the last userform is linked to the 1st but still that slows the processing.
what ive tried
Private Sub cmdOK_Click()
'Unload the userform
Dim u1 As UserForm
Dim u2 As UserForm
Dim u3 As Userform
u1 = UserForm1
u2 = UserForm2
u3 = Userform3
Unload u1
Unload u2
Unload u3
End sub
and
Private Sub cmdOK_Click()
'Unload the userform
Unload UserForm1
Unload UserForm2
Unload Userform3
end sub
and i got errors on those, any suggestions?
now i switched focused to userforms, what i am doing right now is linking userforms with basic controls inside, what i have is 3 userforms on which when the 1st was filled the user clicks NEXT button and then goes to 2nd then again on 3rd. 2nd and 3rd userforms has a BACK button on which loads the previous userforms(if 3rd back then show 2nd, 2nd then show 1st)
well my code do pretty well on that.
i use unload Me for back button and Userform.show on Next button.
yet my problem is on the third userform on which i have the ok button which should closes/unloads all the userforms.
i have a work around on which the ok button is on the 1st userform and that the last userform is linked to the 1st but still that slows the processing.
what ive tried
Private Sub cmdOK_Click()
'Unload the userform
Dim u1 As UserForm
Dim u2 As UserForm
Dim u3 As Userform
u1 = UserForm1
u2 = UserForm2
u3 = Userform3
Unload u1
Unload u2
Unload u3
End sub
and
Private Sub cmdOK_Click()
'Unload the userform
Unload UserForm1
Unload UserForm2
Unload Userform3
end sub
and i got errors on those, any suggestions?