Thanks, Kenneth.
It looks like my problem was the fact that pulling the procedure out of the
userform requires me to now indicate the userform on which I'm changing
captions. So, the problem is now solved. My method of calling the
functions worked just fine, it just didn't know on which userform to change
the captions.
-Randy
"Kenneth Hutson" wrote in message
news:C3D007120407A0F8F3218853EEA14DA9@in.WebX.maYIadrTaRb...
> Randy,
> Following works for me;
>
>
> Form1(Code)
> Private Sub Command1_Click()
> Call Module1.junk
> End Sub
>
> Form2(Code)
> Private Sub Command1_Click()
> Call Module2.junk
> End Sub
>
> Module1(Code)
> Public Sub junk()
> Msgbox("From Module1")
> End Sub
>
> Module2(Code)
> Public Sub junk()
> Msgbox("From Module2")
> End Sub
>
> Cheers,
> Kenneth Hutson
> San Antonio, Texas
>
>
> "Randy Richardson" wrote in message
> news:977ED29D84CAAC8CADF7309969A60B91@in.WebX.maYIadrTaRb...
> > I have two userforms in my module. Some of the required sub procedures
> are
> > needed for both userforms. So, a procedure that I've created for
> UserForm1
> > (Code) has been duplicated and placed also in UserForm2 (Code).
However,
> > this seems wasteful, since the code is identical. Isn't there a way to
> make
> > the code accessible to both userforms without repeating it? I tried
> placing
> > the procedure in Module1 (Code), and although the program seems to know
> its
> > there (it doesn't give me an unknown procedure error) it doesn't seem to
> do
> > anything. I declared it as a public sub which, as I understand it,
should
> > make it readable to all modules. Do I need to resign myself to
> duplicating
> > the same code within the two userforms?
> >
> >
>
>