Hi,
I have a lot of macros built-in Excel, but when I want to update the certain data , I have to run them individually each time. Do you know anyway I can auto-run these macros?
Thanks for any help.
Hi,
I have a lot of macros built-in Excel, but when I want to update the certain data , I have to run them individually each time. Do you know anyway I can auto-run these macros?
Thanks for any help.
I do not have a straight answer for you from within Excel, except to say that I believe you could write a VBA code to do this for you but I do not know VBA well enough to point you in the correct direction.
If you get the pay version (cheap) of Aldos Macro Recorder, there is a section built in that if an entry is made, the macro will run, since it is separate from Excel, Aldos Macro will run your Excel Macro and there you have it.
I also believe that you could build a Visual Studio 2005 or 2008 beta program to do exactly what you want but there is a learning curve, but there is tons of help available, and I have plenty of info for those sites too.
I am thinking that if a cell is updated on your Excel sheet, then there could be a shortcut created in the cell (hyperlink) or the cell next to the updated info and you could easily access the hyperlink directly from the updated cell or its neighboring cell with ease, this is the easiest fix I think, yes it still manual but you will not have to drill down through the macro listing to find it, the exact macro of choice is right there in a hyperlink or shortcut.
You can do an autoexec but there are security implications. I think what you are looking for is Auto_open() It is a VBA module. I believe that it may require you to modify your security settings to work. If you go into the VB editor you can create a module called Auto_open(). Here is an example of one that I did to print off multiplication table worksheets for my kids:
Create a VB module
example:
Sub Auto_Open()
'
' Multiprint Macro
' Print Multiplication Practice Sheets
'
'
Workbooks.Open Filename:= _
"C:\Documents and Settings\Martha\My Documents\xls\Andy Multiplication.xls"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Workbooks.Open Filename:= _
"C:\Documents and Settings\Martha\My Documents\xls\Joe Multiplication.xls"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveWorkbook.Close
ActiveWorkbook.Close
End Sub
The macro is saved into a specific worksheet and when the worksheet is launched, it automatically executes. The worksheet does prompt me to allow macros.
Cheers,
Tom
I guess you can use this for your purpose Activeworkbook.RunAutoMacros xlAutoOpen
All times are GMT -7. The time now is 05:48 PM. |