Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call Excel Macro in VB.NET
I知 new to VB. Net and I知 trying to run an excel macro within a VB.Ne Application This is what I知 doing. Open Excel Application with Macro (Personal.XLS) Open New created Excel Book which needs to be formatted using macr saved in Personal.XLS I知 having problems calling the macro. Please help. Here is my code Dim objExcel As Ne Microsoft.Office.Interop.Excel.ApplicationClass Dim objExcel1 As Ne Microsoft.Office.Interop.Excel.ApplicationClass 'open Personal Spreadsheet and make it visible objExcel.Workbooks.Open("C:\PERSONALreports.XLS") objExcel.Visible = True 'open Excel that needs to be formatted and make it visible t user objExcel1.Workbooks.Open("C:\Test.xls") objExcel1.Visible = True 'run macro to format objExcell2.ExecuteExcel4Macro("objExcell.ExecuteEx cel4MacroLate_Full") 'close open Access applications objExcel.Quit() objExcel1.Quit( -- mimoranPosted from - http://www.officehelp.i |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Call an Access macro from an Excel macro | Excel Discussion (Misc queries) | |||
Excel Macro call Word Macro with Parameters | Excel Programming | |||
How can I call My Computer through an Excel macro? | Excel Discussion (Misc queries) | |||
How To Call VBA Code from Excel 4 Macro | Excel Programming | |||
call .DOC from an Excel VBA macro ? | Excel Programming |