Add buttons to excel to trigger macro

Hello .

I need to add buttons to execute macros.
Basically I need to connect to 10 database instances so need 10 buttons upon clicking them one by one macro will get triggered.
Please suggest

Who is Participating?
Cristi_EConnect With a Mentor Commented:
Hi bond7,
Check the attached file!
For any questions please post!

bond7Author Commented:

I tried creating the button and assigning macros.
The macros that I have created are not coming up when I select assign macro ?
is there any reason why macros would not appear in list of macros but appear properly when I toggle and alt + F11 in vba editor.

NorieVBA ExpertCommented:
Why do you need to connect to 10 database instances?

Are they all different?
bond7Author Commented:

This is just to share my learning .
I understood why macros
appear frozen - - > I need to use alt + F11 to toggle back from excel worksheet to vba editor , otherwise they appear frozen.
macros do not appear issue  - > I need to remove private from sub declaration.

Regainng imnorie comment, there are ten different severs{Input system} , So I  need to record the max primary key for each so that I can know at real time the data movement.

They are ten different oracle servers located in ten different places.
I have implemented the macro with help of you guys in other questions.

NorieVBA ExpertCommented:

Why do you need 10 buttons?

Are you actually monitoring in real-time or are you taking a 'snapshot' for each server when required?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.