ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hit a button with VBA code (https://www.excelbanter.com/excel-programming/355189-hit-button-vba-code.html)

[email protected]

Hit a button with VBA code
 
Hi,

I'm writing VBA code that is copying data from one file to another.
The destination file has 2 buttons (linked to macros) that I need to
select with my code. I cannot see the macro code for these 2 buttons,
and I think both buttons are using one macro. I think the macro
decides what to do based on the button text.

So, basically, I'm trying to figure out how to select those buttons
with my code. Any help/suggestions??


Udo

Hit a button with VBA code
 
Hi,

if i knew which macro would be started by the button, I would call that
macro in my code like you call any other sub.

Udo


Targus

Hit a button with VBA code
 
The thing is, there is only one macro present in that workbook, and
there are a total of 2 buttons in that worksheet. And, the actual
macro doesn't do what the other 2 do. I think they have hidden their
macro.

Regardless, there are 2 buttons I'll need to choose, so I have to be
able to choose a button.



All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com