![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Function Main() Dim xlApp Set xlApp = CreateObject("Excel.Application") xlApp.Workbooks.Open DTSGlobalVariables ("gvTemplateMacro").Value xlApp.Workbooks.Open DTSGlobalVariables ("gvTemplateFile").Value xlApp.Run ("Quail") xlApp.ActiveWorkbook.Close True xlApp.Quit Set xlApp = Nothing Main = DTSTaskExecResult_Success End Function When this code is run it errors saying Quail cannot be found. Quail is on gvTemplateMacro and I trying to open gvTemplateFile and apply the macro. Is there a way to do this? |
#3
| |||
| |||
|
|
-----Original Message----- Not tested but what happens if you create 2 Excel.Application instances instead of just the one ? -- -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "BJ" <bjrichard21 (AT) hotmail (DOT) com> wrote in message news:042401c38dd4$ec10c110$a301280a (AT) phx (DOT) gbl... Function Main() Dim xlApp Set xlApp = CreateObject("Excel.Application") xlApp.Workbooks.Open DTSGlobalVariables ("gvTemplateMacro").Value xlApp.Workbooks.Open DTSGlobalVariables ("gvTemplateFile").Value xlApp.Run ("Quail") xlApp.ActiveWorkbook.Close True xlApp.Quit Set xlApp = Nothing Main = DTSTaskExecResult_Success End Function When this code is run it errors saying Quail cannot be found. Quail is on gvTemplateMacro and I trying to open gvTemplateFile and apply the macro. Is there a way to do this? . |
![]() |
| Thread Tools | |
| Display Modes | |
| |