+ Reply to Thread
Results 1 to 7 of 7

ActiveX Command Button

  1. #1
    Registered User
    Join Date
    06-03-2015
    Location
    South Carolina
    MS-Off Ver
    2013
    Posts
    13

    ActiveX Command Button

    Is there a way to name the Command Button so that it equals a certain cell. For example, my command button is in sheet 2. The cell "A3" in sheet 1 is equal to "Ice Cream". I want the caption of the button to equal cell A3 in sheet 1, "Ice Cream".

  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: ActiveX Command Button

    There is no direct built-in way to link the caption to a cell. You can write a Worksheet_Change event handler in the sheet 1 so that any time the value of A3 changes, the cell value is used to set the button caption.

    If you have further questions about how to do this please attach your file and specify which sheets, which button, which cell.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-03-2015
    Location
    South Carolina
    MS-Off Ver
    2013
    Posts
    13

    Re: ActiveX Command Button

    I had to delete a lot of stuff for confidential reasons so a lot of it won't make sense... So ignore literally everything except for the command button. Sheet 2 has the command button and I want it to equal D15, so that is says "Hitachi DSP-75AT6II"

    Book1.xlsm

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: ActiveX Command Button

    Hello
    It's a little confusing with your sheet naming because you have the Coded Sheet1 named 'Sheet2' and vice versa. This code placed in the worksheet change event for "Sheet1" (Code Name: Sheet2):

    Please Login or Register  to view this content.
    DBY

  5. #5
    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: ActiveX Command Button

    It's not that hard to answer your question; in fact, DBY has provided the same answer that I would.

    But I'm not sure your approach is the most effective for what you are trying to do. As near as I can see, you have a list of companies with a variety of parameters for each one, and you want to select one to compare to Atlas Copco. I would make Sheet2!E16 a dropdown list and then do everything else with formulas. I don't think you need VBA at all. But I'm not clear on what is supposed to happen when you press the button.

  6. #6
    Registered User
    Join Date
    07-17-2015
    Location
    Savannah,Georgia
    MS-Off Ver
    2010
    Posts
    9

    Re: ActiveX Command Button

    6StringJazzer

    I am an excel rookie; please forgive me in advance for any mis-speaking I may enter into my questions. I have created a group of worksheets that spread over a 5 week period that tracks simple numbers. I would like to insert a button at the end of the 5th weeks last sheet that will delete the contents of all unlocked cells across all five weeks. I have searched this forum for hours trying to find something similar but have been unsuccessful. And am contacting you because your reputation rank in this forum is "WOW" for lack of better words. Any help or suggestions would be greatly appreciated. I have attached the sheets that I have mentioned.

  7. #7
    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: ActiveX Command Button

    tommy2620, unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

+ 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. make an activex command button highlight
    By c_spooner1999 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-30-2013, 12:57 PM
  2. Run activex command button via macro
    By dhaval123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-20-2013, 06:07 AM
  3. [SOLVED] ActiveX command button error on Mac!!!
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-26-2013, 03:09 AM
  4. [SOLVED] Editing a Command Button - ActiveX?
    By Jennster in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2012, 08:19 AM
  5. ActiveX Command Button Text Looks Bad
    By brownsl in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-07-2012, 07:35 AM
  6. ActiveX command button visible through Chart
    By Richardza in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-12-2010, 10:00 AM
  7. ActiveX command button
    By Dr.Schwartz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2005, 04:05 PM
  8. ActiveX Command Button Moves after Printing
    By Roger-Bullivant in forum Excel General
    Replies: 1
    Last Post: 04-01-2005, 04:10 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