Solved

Add buttons to excel to trigger macro

Posted on 2010-11-17
5
308 Views
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

best
bond
0
Comment
Question by:bond7
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

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

Cristi
Trigger-macro.xls
0
 

Author Comment

by:bond7
ID: 34164361
Hello,


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.

0
 
LVL 33

Expert Comment

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

Are they all different?
0
 

Author Comment

by:bond7
ID: 34171727
Hello,

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.

Thanks
bond
0
 
LVL 33

Expert Comment

by:Norie
ID: 34174131
bond

Why do you need 10 buttons?

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

828 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