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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 34

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 34

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

624 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