Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This works perfectly.
Thanks! NickHK wrote: Here's one way ThisWorkbook.Worksheets("Sheet3").CommandButton4.V alue = True NickHK wrote in message ups.com... Yes, I am trying to fake a button click. The worksheet (there are many worksheets, otherwise I would just click the button myself) is protected so I can't change the code. How do I go about doing #2? Would that fake a click? Thanks. NickHK wrote: If you are trying to fake a button click, rather than Dave's suggestion of code location, you have a couple of options: 1 - Calling the code for the click event; Call cmdButton_Click But you will have change the _Click routine from Private (default) to Public so it can be seen outside the module. Also reference the correct WB/WS as required. 2 - Some people feel it is wrong to call events like the above. If so use cmdButton.Value=True NickHK wrote in message oups.com... I have a protected worksheet that has a button that I want to execute using VBA. The worksheet in question is protected with the exception of certain cells where I can paste values. I am creating a VBA to do all the pasting but I can't figure out how to execute the button. Run or Call don't work. Help. TIA. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Command button to toggle worksheet event code on / off? | Excel Discussion (Misc queries) | |||
c# code to add button control to the worksheet!!!! | Excel Programming | |||
How to make a button VBA code reference other VBA code subroutines??? | Excel Programming | |||
Create a newworksheet with VBA code and put VBA code in the new worksheet module | Excel Programming | |||
print different worksheet by pressing visible button on worksheet | Excel Worksheet Functions |