Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add a macro
Hi, all:
Could you tell me how to insert a macro to excel externally, i.e. from an external language that uses automation from Excel? I need to run the macro from inside Excel, rather than the External language. So, from the external language (vb6 or .net) I would call the Application object and run the macro, which is in Excel. For instance, I want to have the folowing code inside Excel: Sub Auto_open() ... Some Code End Sub How can I Include it before Excel opens? Thank you, Rick. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add a macro
http://www.cpearson.com/excel/vbe.htm
shows you how to program the VBE. If using xl2002 or later, the user would have to trust access to the VBE in their security settings. You wouldn't be able to open a file, then put in an autoopen macro and expect it to run at that time. However, there is no reason you can't run it with your code after it is created. http://support.microsoft.com/?id=177760 ---------- http://support.microsoft.com/?id=219151 Q219151 - HOWTO: Automate Excel 97 and Excel 2000 from Visual Basic http://support.microsoft.com/?id=167223 Microsoft Office 97 Automation Help File Available on MSL -- Regards, Tom Ogilvy "newbie in hell" wrote: Hi, all: Could you tell me how to insert a macro to excel externally, i.e. from an external language that uses automation from Excel? I need to run the macro from inside Excel, rather than the External language. So, from the external language (vb6 or .net) I would call the Application object and run the macro, which is in Excel. For instance, I want to have the folowing code inside Excel: Sub Auto_open() ... Some Code End Sub How can I Include it before Excel opens? Thank you, Rick. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add a macro
Hi Rick,
See Chip Pearson's at: Programming To The Visual Basic http://www.cpearson.com/excel/vbe.htm --- Regards, Norman "newbie in hell" wrote in message ... Hi, all: Could you tell me how to insert a macro to excel externally, i.e. from an external language that uses automation from Excel? I need to run the macro from inside Excel, rather than the External language. So, from the external language (vb6 or .net) I would call the Application object and run the macro, which is in Excel. For instance, I want to have the folowing code inside Excel: Sub Auto_open() ... Some Code End Sub How can I Include it before Excel opens? Thank you, Rick. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add a macro
Thank you.
What I need is to create a macro programmatically (from the other language). Rick. "Norman Jones" wrote: Hi Rick, See Chip Pearson's at: Programming To The Visual Basic http://www.cpearson.com/excel/vbe.htm --- Regards, Norman "newbie in hell" wrote in message ... Hi, all: Could you tell me how to insert a macro to excel externally, i.e. from an external language that uses automation from Excel? I need to run the macro from inside Excel, rather than the External language. So, from the external language (vb6 or .net) I would call the Application object and run the macro, which is in Excel. For instance, I want to have the folowing code inside Excel: Sub Auto_open() ... Some Code End Sub How can I Include it before Excel opens? Thank you, Rick. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to add a macro
And that link and the links I provided show you how. -- Regards, Tom Ogilvy "newbie in hell" wrote: Thank you. What I need is to create a macro programmatically (from the other language). Rick. "Norman Jones" wrote: Hi Rick, See Chip Pearson's at: Programming To The Visual Basic http://www.cpearson.com/excel/vbe.htm --- Regards, Norman "newbie in hell" wrote in message ... Hi, all: Could you tell me how to insert a macro to excel externally, i.e. from an external language that uses automation from Excel? I need to run the macro from inside Excel, rather than the External language. So, from the external language (vb6 or .net) I would call the Application object and run the macro, which is in Excel. For instance, I want to have the folowing code inside Excel: Sub Auto_open() ... Some Code End Sub How can I Include it before Excel opens? Thank you, Rick. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |