LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Application.Run with multiple workbooks

Hi,

What do you mean by compiling the code into dll?
Do you mean make a com addin dll, and invoke the macro from the com addin?

I have tried to make an addin in VB6 and call a similar macro with optional
parameter, it seems to run smoothly on my side.
Here is the code I run from the addin
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal
ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As
Object, custom() As Variant)
On Error GoTo error_handler
Set exApp = Application
exApp.Visible = True
exApp.Workbooks.Open "c:\book1.xls"
exApp.Workbooks.Open "c:\book2.xls"
exApp.Run "Book1.xls!Test", "LocalPrinter", 1
exApp.Run "Book2.xls!Test", "LocalPrinter", 2
Exit Sub
error_handler:
MsgBox Err.Description
End Sub

If I have any misunderstanding, please feel free to let me know.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

 
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
Updating Workbooks from multiple links Workbooks TimJames Excel Worksheet Functions 1 December 15th 07 03:34 PM
i need help with a function application with multiple arguments tarabull Excel Worksheet Functions 3 November 3rd 07 03:36 AM
Multiple Lookup Application JAD Excel Worksheet Functions 2 June 4th 07 10:38 PM
Multiple Application.UserNames Bob Excel Discussion (Misc queries) 4 May 15th 06 06:19 PM
Combine multiple workbooks into 1 workbook w/ multiple worksheets buffgirl71 Excel Discussion (Misc queries) 1 May 13th 06 12:28 PM


All times are GMT +1. The time now is 05:00 PM.

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

About Us

"It's about Microsoft Excel"