+ Reply to Thread
Results 1 to 4 of 4

Assign macro to user form buttons

  1. #1
    Registered User
    Join Date
    09-16-2019
    Location
    Philippines
    MS-Off Ver
    365
    Posts
    29

    Assign macro to user form buttons

    My file has buttons from inserting shapes then assigning macro.

    I inserted a command button at the top frozen column (to show userform when clicked) so when I scroll down these options will still be available.

    Pasting the code from those shape buttons to command buttons don't work though.
    Attached Files Attached Files
    Last edited by mia12; 09-03-2021 at 10:59 AM.

  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,530

    Re: Assign macro to user form buttons

    There is no indication in this file that you tried pasting code from shape buttons into the form code. Use this as your UserForm1 code. You do not need "Exit Sub". I did not test this but this change will make the UserForm buttons do whatever the worksheet shape buttons do.

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

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,158

    Re: Assign macro to user form buttons

    You have not assigned procedure calls in the Userform1 module:
    Please Login or Register  to view this content.
    Artik

  4. #4
    Registered User
    Join Date
    09-16-2019
    Location
    Philippines
    MS-Off Ver
    365
    Posts
    29

    Re: Assign macro to user form buttons

    Thank youuu! This worked. Appreciate it
    Last edited by mia12; 09-03-2021 at 10:58 AM. Reason: SOLVED

+ 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. Assign user form label to cell value
    By rbeech23 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-13-2020, 10:40 AM
  2. [SOLVED] Assign macro to user form checkbox without running it
    By PaulM100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2019, 09:45 AM
  3. How to assign VBA code to user form controls
    By pedropumpalot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2015, 08:18 PM
  4. [SOLVED] Option buttons on a user form
    By Aland2929 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2013, 07:39 AM
  5. [SOLVED] (updating inventory using user form) : Assign macro to "バeck Availibility" command button
    By pyol17 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-08-2012, 06:50 AM
  6. How to: User Form to assign a user defined range to a macro variab
    By TrevTrav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2005, 04:06 PM
  7. Code Behind Buttons on User Form
    By robertguy in forum Excel General
    Replies: 0
    Last Post: 02-09-2005, 11:53 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