Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Updating Workbooks from multiple links Workbooks | Excel Worksheet Functions | |||
i need help with a function application with multiple arguments | Excel Worksheet Functions | |||
Multiple Lookup Application | Excel Worksheet Functions | |||
Multiple Application.UserNames | Excel Discussion (Misc queries) | |||
Combine multiple workbooks into 1 workbook w/ multiple worksheets | Excel Discussion (Misc queries) |