Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Running Macros from Excel Saved as html file

Good day,

What is the command to run a macro as soon as a file is opened?

Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Running Macros from Excel Saved as html file

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 he
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.)

Brent E wrote:

Good day,

What is the command to run a macro as soon as a file is opened?

Thanks,


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Running Macros from Excel Saved as html file

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,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Running Macros from Excel Saved as html file

Thanks Dave. Will try that.

"Dave Peterson" wrote:

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 he
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.)

Brent E wrote:

Good day,

What is the command to run a macro as soon as a file is opened?

Thanks,


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default Running Macros from Excel Saved as html file

Of the file is saved as HTML. there is nowhere for the VBA code to 'hide'
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Brent E" wrote in message
...
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,





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Running Macros from Excel Saved as html file

AFAIK, an Excel file saved in HTML format does not contain macros.

On Thu, 16 Oct 2008 14:01:02 -0700, Brent E
wrote:

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number Format on Excel File saved from .html file joyfulone Excel Discussion (Misc queries) 3 April 15th 09 12:07 AM
Excel file not opening when saved with Extention .html sfleck Excel Worksheet Functions 1 April 22nd 08 05:14 PM
Running code before any file is opened/saved Bill Schanks Excel Programming 2 April 14th 06 06:01 PM
Picture disappears when saved as html file Tim - Daiwa Excel Discussion (Misc queries) 1 April 8th 05 10:49 PM
Open file saved in HTML format Sheela Excel Programming 4 September 8th 03 05:25 AM


All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"