+ Reply to Thread
Results 1 to 4 of 4

Transfer Data in Userform

  1. #1
    Forum Contributor
    Join Date
    02-07-2011
    Location
    netherlands
    MS-Off Ver
    Excel 2003
    Posts
    128

    Transfer Data in Userform

    Hello i experiance some struggeling with this point.

    The main point is transfer data from 1 variable outside the userform, inside the userform.


    This is what i currently have wich wasn't so succesfull:
    Please Login or Register  to view this content.
    Userform:
    Please Login or Register  to view this content.

    In the first code is the code outside the userform. the values there are putten in M and WS correctly, but when the userform is opened it does not excist within the userform.

    Is there another way by declaring the variables outside the userform and still be able to use them inside the "Private Sub UserForm_Initialize()"?
    Last edited by vin1; 02-14-2012 at 09:58 AM.

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Transfer Data in Userform

    These two line
    Please Login or Register  to view this content.
    should be in a normal module, not a worksheet code module. If they are in a worksheet, you need to specify the code name of the worksheet when using them in the form - for example
    Please Login or Register  to view this content.
    Good luck.

  3. #3
    Registered User
    Join Date
    12-10-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Transfer Data in Userform

    I'm going to have to do plenty of something similar soon. My approach will simply to have a worksheet which acts as a hub for variables that are to be passed between userforms. To exchange simply paste the value of the variable into the predefined cell. When you initialize the next user form you can bring the value of the variable back and insert it into the form.

    Is that likely to solve your problem?

  4. #4
    Forum Contributor
    Join Date
    02-07-2011
    Location
    netherlands
    MS-Off Ver
    Excel 2003
    Posts
    128

    Re: Transfer Data in Userform

    Quote Originally Posted by OnErrorGoto0 View Post
    These two line
    Please Login or Register  to view this content.
    should be in a normal module, not a worksheet code module. If they are in a worksheet, you need to specify the code name of the worksheet when using them in the form - for example
    Please Login or Register  to view this content.



    Thanks i didn't knew that. That my problem.

+ 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