+ Reply to Thread
Results 1 to 3 of 3

Passing a string from worksheet module to userform.

  1. #1
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Passing a string from worksheet module to userform.

    Hi all!

    This is a simplified version of what I'm trying to achieve, I've lost track of how many failed attempts I've had at what must be something incredibly simple.

    In a worksheet module, to initialise the userform.
    Please Login or Register  to view this content.
    Userform code,
    Please Login or Register  to view this content.
    The (simplified) intention is to search for the item selected in the combobox on the worksheet and copy the selection value (myString) into the next column.
    Please note that this needs to be done with a string variable for it to work with the less simple version, not copy / paste, range object, etc.

    Thanks in advance for any suggestions.

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

    Re: Passing a string from worksheet module to userform.

    The declaration
    Please Login or Register  to view this content.
    has to be in a normal module (outside of every proceedure).
    It looks it is in a sheet's code module instead of a normal module.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Passing a string from worksheet module to userform.

    That was the incredibly simple something that I was missing!

    Thanks, Mike!

+ 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] Passing a variable from userform to module code - value being dropped or not seen
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-22-2018, 06:02 AM
  2. Advice on passing userform parameters to a vba class module
    By techno_gronk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2017, 06:13 AM
  3. Replies: 7
    Last Post: 06-16-2016, 08:54 AM
  4. Replies: 1
    Last Post: 04-16-2014, 12:02 AM
  5. Transfering Worksheet varaible from Userform to Module?
    By vin1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2011, 07:34 AM
  6. Code in userform/worksheet vs. in Module
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2006, 11:20 AM
  7. Passing variable from userform to module error
    By mworth01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2005, 12:47 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