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".
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".
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.
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
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):
DBYPlease Login or Register to view this content.
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.
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.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks