Thursday, June 20, 2013   
  Search   
 

Office 2010 - Launch Event

Register  Login  
Forums  
     Minimize  

MeraWindows Forums - Get your Computer Problems Fixed

This is a site run by the community - for the community. At the site, we share and contribute our computer learnings with each other. We discuss about Windows, Office, Mobile, Gaming and other computer related topics. At our forums you can post your queries and our very helpful community members will respond quickly to your queries. We organize lots of competitions from time to time and award prizes to the winners.
You will need to register at the site before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelExcel VBA, automate clicking of buttonsExcel VBA, automate clicking of buttons
Previous
 
Next
New Post
12/23/2011 2:01 PM
 
Hi All,

My Excel Workbook contains 4 worksheets and all the sheets have been programmed.
All the programs are actuated by clicking the button. 

My problem is, i have a total of 5 buttons for 3 sheets and i would like to automate it. i.e by just clicking the first one, the others have to follow one after another. By clicking the first button, first program will execute and after that, the second program of other sheet automatically follow. So, that i can press the button n sleep to wake up to the solution!

Is there any option in excel for the above

Thanks in advance.
 
New Post
12/23/2011 2:12 PM
 
Hi,

Please upload the file which already has the five macros

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/23/2011 2:41 PM
 
Sir,
the sample file is attched
 
 TRY.zip
New Post
12/23/2011 2:54 PM
 
Hi,

In which order should the macros be executed.  Please be specific.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/23/2011 3:51 PM
 
Sir, the buttons have been numbered.
Sorry for the inconvinience
 
 TRY.zip
New Post
12/23/2011 4:37 PM
 
Hi,

You will have to make a couple of changes to your code.  First of all, store all your seven macros in modules instead of storing them in specific worksheets.  Once you do this, the macro names will also change i.e. they will no longer be Private Sub CommandButton1_Click() but will be Sub macro1 instead.  This also means that your codes will have to change.  For e.g. cells(i,3) will have to become worksheets("Data").cells(i,3).

Once all macros are stored in modules, then you will have to create another macro in a module which will be like

Sub run_all
Run macro1
Run macro2
Run macro3
end sub

Hope this helps.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
12/23/2011 4:50 PM
 
Dear Sir,
Many Thanks for the solution. I will try it

Arjun
 
Previous
 
Next
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelExcel VBA, automate clicking of buttonsExcel VBA, automate clicking of buttons


   User Log In Minimize  


Register
Forgot Password ?

     
  
   Follow Us Minimize  
     
  
     Minimize