B Brent E Oct 16, 2008 #1 Good day, What is the command to run a macro as soon as a file is opened? Thanks,
D Dave Peterson Oct 16, 2008 #2 You can put this into a General module: Option Explicit Sub Auto_Open() Msgbox "Hi from Brent" End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros here: http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.)
You can put this into a General module: Option Explicit Sub Auto_Open() Msgbox "Hi from Brent" End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros here: http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.)
B Brent E Oct 16, 2008 #3 I apologize, this was a mispost on a different topic. The question I wanted to ask for this post is as follows: Is there a way to get the macros in a spreadsheet to run if the file is saved as an html file? Thanks,
I apologize, this was a mispost on a different topic. The question I wanted to ask for this post is as follows: Is there a way to get the macros in a spreadsheet to run if the file is saved as an html file? Thanks,
B Brent E Oct 16, 2008 #4 Thanks Dave. Will try that. Dave Peterson said: You can put this into a General module: Option Explicit Sub Auto_Open() Msgbox "Hi from Brent" End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros here: http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Click to expand...
Thanks Dave. Will try that. Dave Peterson said: You can put this into a General module: Option Explicit Sub Auto_Open() Msgbox "Hi from Brent" End Sub If you're new to macros: Debra Dalgleish has some notes how to implement macros here: http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Click to expand...
B Bernard Liengme Oct 16, 2008 #5 Of the file is saved as HTML. there is nowhere for the VBA code to 'hide' best wishes
T Tushar Mehta Oct 16, 2008 #6 AFAIK, an Excel file saved in HTML format does not contain macros. On Thu, 16 Oct 2008 14:01:02 -0700, Brent E Good day, What is the command to run a macro as soon as a file is opened? Thanks, Regards, Tushar Mehta Microsoft MVP Excel 2000-2008 www.tushar-mehta.com Tutorials and add-ins for Excel, PowerPoint, and other products
AFAIK, an Excel file saved in HTML format does not contain macros. On Thu, 16 Oct 2008 14:01:02 -0700, Brent E Good day, What is the command to run a macro as soon as a file is opened? Thanks, Regards, Tushar Mehta Microsoft MVP Excel 2000-2008 www.tushar-mehta.com Tutorials and add-ins for Excel, PowerPoint, and other products