Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
Excel Macro call Word Macro with Parameters Bill Sturdevant[_2_] Excel Programming 9 May 24th 07 12:21 AM
How can I call My Computer through an Excel macro? SAM SEBAIHI Excel Discussion (Misc queries) 0 February 24th 07 02:07 AM
How To Call VBA Code from Excel 4 Macro Gaston Excel Programming 4 March 25th 05 09:47 PM
call .DOC from an Excel VBA macro ? Ayato Excel Programming 1 December 1st 03 11:26 PM


All times are GMT +1. The time now is 01:50 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"