+ Reply to Thread
Results 1 to 7 of 7

userform variable

  1. #1
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    userform variable

    hi
    how pass variable from userform to another userform

    thanks

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,301

    Re: userform variable

    Quite simply, declare them in the standard module as global variables

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: userform variable

    You have to set the userform ShowModal property to False. Then, if the userform names are UserForm1 and Userfom2 like in the attached, use this for useform2
    Please Login or Register  to view this content.
    mena userform variable.xlsm
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,645

    Re: userform variable

    Hi there,

    Good programming practice indicates that values should be passed to UserForms, Classes etc. by means of user-defined properties of those objects.

    I can give you more information on this approach if you need it.


    Hope this helps.

    Regards,

    Greg M

  5. #5
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    Re: userform variable

    great thank you very much porucha vevrku

  6. #6
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    Re: userform variable

    yes i need Greg M ..... thank u

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,645

    Re: userform variable

    Hi again,

    See if the attached workbook gets you moving in the right direction.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Run-time error '91': Object variable or With block variable not set when closing userform
    By bishoposiris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2016, 08:59 AM
  2. [SOLVED] Passing a variable to a userform
    By OldMan62 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-08-2014, 12:58 PM
  3. [SOLVED] Using IF THEN ELSE to set variable for Userform
    By ananinginaneana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2014, 12:21 PM
  4. [SOLVED] userform variable
    By LRFT in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2012, 05:53 PM
  5. [SOLVED] Global variable declared in Userform. Variable value is not sticking
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-25-2012, 08:50 AM
  6. passing variable from userform
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-31-2010, 08:22 PM
  7. [SOLVED] VBA Variable as userform
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2006, 03:35 PM

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