Hi, all
Does it possible to click the commandbutton(or activate the
commandbutton_click event) on the userform from the global module?
Hi, all
Does it possible to click the commandbutton(or activate the
commandbutton_click event) on the userform from the global module?
If you make it public instead of private
Public Sub CommandButton1_Click()
end Sub
then in another module you can do
Sheet1!CommandButton1_Click
Where sheet1 is the code name of the sheet containing the code.
--
Regards,
Tom Ogilvy
"OKLover" <[email protected]> wrote in message
news:[email protected]...
> Hi, all
>
> Does it possible to click the commandbutton(or activate the
> commandbutton_click event) on the userform from the global module?
What if the commandbutton is on the userform? how to call it?
"Tom Ogilvy" wrote:
> If you make it public instead of private
>
> Public Sub CommandButton1_Click()
>
> end Sub
>
> then in another module you can do
>
> Sheet1!CommandButton1_Click
>
> Where sheet1 is the code name of the sheet containing the code.
> --
> Regards,
> Tom Ogilvy
>
> "OKLover" <[email protected]> wrote in message
> news:[email protected]...
> > Hi, all
> >
> > Does it possible to click the commandbutton(or activate the
> > commandbutton_click event) on the userform from the global module?
>
>
>
Sub Demo()
Call UserForm1.CommandButton1_Click
End Sub
HTH. Best wishes Harald
"OKLover" <[email protected]> skrev i melding
news:[email protected]...
> What if the commandbutton is on the userform? how to call it?
>
> "Tom Ogilvy" wrote:
>
> > If you make it public instead of private
> >
> > Public Sub CommandButton1_Click()
> >
> > end Sub
> >
> > then in another module you can do
> >
> > Sheet1!CommandButton1_Click
> >
> > Where sheet1 is the code name of the sheet containing the code.
> > --
> > Regards,
> > Tom Ogilvy
> >
> > "OKLover" <[email protected]> wrote in message
> > news:[email protected]...
> > > Hi, all
> > >
> > > Does it possible to click the commandbutton(or activate the
> > > commandbutton_click event) on the userform from the global module?
> >
> >
> >
Thank you
"Harald Staff" wrote:
> Sub Demo()
> Call UserForm1.CommandButton1_Click
> End Sub
>
>
> HTH. Best wishes Harald
>
> "OKLover" <[email protected]> skrev i melding
> news:[email protected]...
> > What if the commandbutton is on the userform? how to call it?
> >
> > "Tom Ogilvy" wrote:
> >
> > > If you make it public instead of private
> > >
> > > Public Sub CommandButton1_Click()
> > >
> > > end Sub
> > >
> > > then in another module you can do
> > >
> > > Sheet1!CommandButton1_Click
> > >
> > > Where sheet1 is the code name of the sheet containing the code.
> > > --
> > > Regards,
> > > Tom Ogilvy
> > >
> > > "OKLover" <[email protected]> wrote in message
> > > news:[email protected]...
> > > > Hi, all
> > > >
> > > > Does it possible to click the commandbutton(or activate the
> > > > commandbutton_click event) on the userform from the global module?
> > >
> > >
> > >
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks