+ Reply to Thread
Results 1 to 5 of 5

changing variables?

Hybrid View

  1. #1
    Larry Sartoris
    Guest

    changing variables?

    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?

  2. #2
    Bob Phillips
    Guest

    Re: changing variables?

    ThisWorkbook.Var = 17

    as an example.

    Make sure Var is public.

    --
    HTH

    Bob Phillips

    "Larry Sartoris" <LarrySartoris@discussions.microsoft.com> wrote in message
    news:D3BC9C6D-248D-4ECD-A1F5-798A15054E66@microsoft.com...
    > 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?




  3. #3
    Larry Sartoris
    Guest

    Re: changing variables?

    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" <LarrySartoris@discussions.microsoft.com> wrote in message
    > news:D3BC9C6D-248D-4ECD-A1F5-798A15054E66@microsoft.com...
    > > 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?

    >
    >
    >


  4. #4
    Larry Sartoris
    Guest

    Re: changing variables?

    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" <LarrySartoris@discussions.microsoft.com> wrote in message
    > > news:D3BC9C6D-248D-4ECD-A1F5-798A15054E66@microsoft.com...
    > > > 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?

    > >
    > >
    > >


  5. #5
    Bob Phillips
    Guest

    Re: changing variables?



    "Larry Sartoris" <LarrySartoris@discussions.microsoft.com> wrote in message
    news:3CD277AA-46DD-429E-95CD-63C6D00162EF@microsoft.com...
    > I figured it out.


    Even better.



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1