J
Jan
This is a question to Steve and/or David:
To make my code ready for sending it to David, I need to provide an user
interface. I've built a form with several option buttons and two command
buttons Run and Quit. The option buttons, grouped in two frames, were to set
the values of two variables declared in ClassWithEvents, a member of Class
Modules: Public NrHA, NrHB As Integer
Then, my option buttons have code, say
Private Sub OptionButton1_Click()
NrHA = 1
'for debugging only:
MsgBox "btnOne" + vbCrLf + CStr(NrHA)
End Sub
Using MsgBox(es) I can see that the NrHA is properly set within Sub
OptionButton1 when the button is selected. However it is not defined outside
this Sub. It is not even defined within the form class, among others on my
command buttons.
It must be something very elemental, but after spending the weekend trying
to find what it is, finally I decided to post it. I am new to VBA, but I
have previous programming experience, mostly with Fortran, Algol, Pascal and
some assemblers.
My question and kind request: what should I do to pass the value of my
variables to my main code Private Sub FuctionShow_SlideShowNextSlide(ByVal
Wn As SlideShowWindow) sitting in ClassWithEvents. Also, please, what is the
rational behind the solution.
I will really appreciate your help. You may respond here or, if you prefer,
to jczATtelusplanet.net.nospamplease - I think you can figure it out easily.
Thanks a lot, JanAdam
To make my code ready for sending it to David, I need to provide an user
interface. I've built a form with several option buttons and two command
buttons Run and Quit. The option buttons, grouped in two frames, were to set
the values of two variables declared in ClassWithEvents, a member of Class
Modules: Public NrHA, NrHB As Integer
Then, my option buttons have code, say
Private Sub OptionButton1_Click()
NrHA = 1
'for debugging only:
MsgBox "btnOne" + vbCrLf + CStr(NrHA)
End Sub
Using MsgBox(es) I can see that the NrHA is properly set within Sub
OptionButton1 when the button is selected. However it is not defined outside
this Sub. It is not even defined within the form class, among others on my
command buttons.
It must be something very elemental, but after spending the weekend trying
to find what it is, finally I decided to post it. I am new to VBA, but I
have previous programming experience, mostly with Fortran, Algol, Pascal and
some assemblers.
My question and kind request: what should I do to pass the value of my
variables to my main code Private Sub FuctionShow_SlideShowNextSlide(ByVal
Wn As SlideShowWindow) sitting in ClassWithEvents. Also, please, what is the
rational behind the solution.
I will really appreciate your help. You may respond here or, if you prefer,
to jczATtelusplanet.net.nospamplease - I think you can figure it out easily.
Thanks a lot, JanAdam