Hit a button with VBA code

  • Thread starter Thread starter kkontur
  • Start date Start date
K

kkontur

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??
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top