+ Reply to Thread
Results 1 to 4 of 4

Pass Control to Function/Sub

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    21

    Pass Control to Function/Sub

    Hello

    I'd like to pass a control to a function for further processing - but I can't make it work.

    Which is the correct parameter type?
    This doesn't work (just an example):

    Please Login or Register  to view this content.
    This code would be called from a control the following way:
    Please Login or Register  to view this content.
    Is this possible?
    Last edited by mscola; 07-05-2016 at 02:40 PM.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Pass Control to Function/Sub

    It should be a single object "As Control" (without s) :

    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Registered User
    Join Date
    02-15-2011
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Pass Control to Function/Sub

    Now it works!

    I was wondering why there are 2x Controls and 1x to choose from.

    Thanks!

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Pass Control to Function/Sub

    You are welcome. Thanks for marking the thread as solved.


    Regards

+ 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] Pass Value From Subform To Text Box Control On Other Form VBA
    By Excel4444 in forum Access Tables & Databases
    Replies: 2
    Last Post: 03-10-2016, 02:08 PM
  2. Pass value from Outlook to excel userform control
    By deepika.shinde in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2015, 08:13 AM
  3. How might I pass the name of an updated control to another sub?
    By bodhi808 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 04:56 PM
  4. pass control to user while running macro
    By CocoMoco in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2011, 02:30 AM
  5. pass control as argument
    By horbay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2011, 09:04 AM
  6. How to pass interior colours of specified range to a control.
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-27-2005, 08:05 AM
  7. [SOLVED] How to Pass Control from VBA to user and return
    By needyourhelp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2005, 08:05 AM

Tags for this Thread

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