I made my own little userform and I wanted to change a variable in "This
Workbook" when I hit the cancel button on the user form.
Does this make sense?
I made my own little userform and I wanted to change a variable in "This
Workbook" when I hit the cancel button on the user form.
Does this make sense?
ThisWorkbook.Var = 17
as an example.
Make sure Var is public.
--
HTH
Bob Phillips
"Larry Sartoris" <[email protected]> wrote in message
news:[email protected]...
> I made my own little userform and I wanted to change a variable in "This
> Workbook" when I hit the cancel button on the user form.
>
> Does this make sense?
I'm sure you saw this coming but... how do I know if its a public variable or
not?
or how would I set it as a public variable
"Bob Phillips" wrote:
> ThisWorkbook.Var = 17
>
> as an example.
>
> Make sure Var is public.
>
> --
> HTH
>
> Bob Phillips
>
> "Larry Sartoris" <[email protected]> wrote in message
> news:[email protected]...
> > I made my own little userform and I wanted to change a variable in "This
> > Workbook" when I hit the cancel button on the user form.
> >
> > Does this make sense?
>
>
>
I figured it out. Didn't know it had to be outside of the sub. And in main
module
Thanks
"Larry Sartoris" wrote:
> I'm sure you saw this coming but... how do I know if its a public variable or
> not?
>
> or how would I set it as a public variable
>
> "Bob Phillips" wrote:
>
> > ThisWorkbook.Var = 17
> >
> > as an example.
> >
> > Make sure Var is public.
> >
> > --
> > HTH
> >
> > Bob Phillips
> >
> > "Larry Sartoris" <[email protected]> wrote in message
> > news:[email protected]...
> > > I made my own little userform and I wanted to change a variable in "This
> > > Workbook" when I hit the cancel button on the user form.
> > >
> > > Does this make sense?
> >
> >
> >
"Larry Sartoris" <[email protected]> wrote in message
news:[email protected]...
> I figured it out.
Even better.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks