Add buttons to excel to trigger macro

Posted on 2010-11-17
Last Modified: 2012-05-10
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

Question by:bond7
  • 2
  • 2

Accepted Solution

Cristi_E earned 250 total points
ID: 34154665
Hi bond7,
Check the attached file!
For any questions please post!


Author Comment

ID: 34164361

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.

LVL 33

Expert Comment

ID: 34165766
Why do you need to connect to 10 database instances?

Are they all different?

Author Comment

ID: 34171727

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.

LVL 33

Expert Comment

ID: 34174131

Why do you need 10 buttons?

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now