+ Reply to Thread
Results 1 to 5 of 5

Pass Userform values to UF variables

  1. #1
    Registered User
    Join Date
    11-04-2011
    Location
    Geneva, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Pass Userform values to UF variables

    I have read the previous posts (mikerickson) and tried to implement them without success.
    See http://www.excelforum.com/excel-prog...-into-vba.html

    Userform frmData obtains cell ranges in RefEdits and two doubles in text boxes.

    Please Login or Register  to view this content.
    The result is Error 91 - object not set or no With.

    I see the Me object in Locals. It includes the RefEdit and Text objects. These seem to have values in three baleces: BoundValue, Value and Text. I have tried all three without success.
    I have tried both explicit Me and frmData in the object names and a With End With statement using Me and frmData, both with no success.

    I am not sure of the problem.
    Error 91 implies that the object is not being referenced, but Me is there. Explicit frmData makes no difference.
    Substituting BoundValue, Value and Text makes no difference.

    I appreciate your Expert help - this is my first experience with Userforms having previously dealt only with User Functions.
    Last edited by PNCD1957; 11-04-2011 at 08:32 PM.

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Pass Userform values to UF variables

    I'm guessing here.

    If you Dim Result() as an Array, I believe you have to refer to it as an array at all times.

    Result() = test(.....)

    Try
    Please Login or Register  to view this content.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  3. #3
    Registered User
    Join Date
    11-04-2011
    Location
    Geneva, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Pass Userform values to UF variables

    OK, it is sorted.
    I did the obvious: copy mikerickson code, confirm it works as is, then made progressive changes to get what I needed.
    I do not know how to mark as solved!

  4. #4
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Pass Userform values to UF variables

    In the original message click EDIT>GO ADVANCED>PREFIX

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Pass Userform values to UF variables

    I'm glad my code worked for you.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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