+ Reply to Thread
Results 1 to 3 of 3

Access worksheet controls from a Userform

  1. #1
    Registered User
    Join Date
    09-12-2018
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    32

    Access worksheet controls from a Userform

    Sigh - me again.
    I thought I remembered how to do this; apparently not.
    I have a button on a worksheet and I would like to change its properties using code in a userform command buttons Click event.
    The name of the button on the worksheet is "ButtonSave" and I want to toggle its locked property - like this: ButtonSave.Locked=False. When I try this from the userform I get an error - Object required. I thought there was a fairly simple solution, but I'm having memory problems exacerbated by a lack of sleep, so I'm a little befuddled.
    If there is an answer - cool. If not, I can fake it.
    Happy eve',
    Shawn

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Access worksheet controls from a Userform

    You will have to qualify it with the sheet object, either by tab name or code name:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-12-2018
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    32

    Re: Access worksheet controls from a Userform

    Thanks,
    Feeling a little stupid right now.
    Much appreciated.
    Happy night,
    Shawn

+ 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. Userform Login on userform and disabling/enabling userforms controls
    By waimea in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2019, 10:37 AM
  2. [SOLVED] Loop through Userform controls using worksheet list
    By kay007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2017, 10:14 AM
  3. [SOLVED] Access combobox controls in worksheet - Getting runtime error '438'
    By padala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2016, 11:08 PM
  4. Userform closes excel before i can access worksheet
    By karmadog62 in forum Excel General
    Replies: 2
    Last Post: 09-23-2015, 03:19 PM
  5. [SOLVED] adapt userform loop using control name containing variable for worksheet activex controls
    By bmeister in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-22-2014, 02:45 PM
  6. Replies: 1
    Last Post: 09-05-2013, 10:12 AM
  7. controls to access a database in a UserForm
    By lalbatros in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2007, 07:14 AM

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