Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kdyer
Yak Posting Veteran
53 Posts |
Posted - 2007-05-16 : 18:40:13
|
I am getting the error below when I run the VB Code Below as an ActiveX component of a DTS Package.. It does appear to work, as it inserts the SUM values."Error Source: Microsoft Data Transformation Services (DTS) PackageError Description: Invalid Task Result Value"Option ExplicitFunction Main() 'On Error Resume Next Dim xlApp Dim wkbk Set xlApp = CreateObject("EXCEL.APPLICATION") Set wkbk = xlApp.Workbooks.Open("C:\counter\overall.xls") xlApp.Range("A15").Value = "TOTALS" xlApp.Range("B15").Value = "=SUM(R[-13]C:R[-2]C)" xlApp.Range("C15").Value = "=SUM(R[-13]C:R[-2]C)" xlApp.Range("D15").Value = "=SUM(R[-13]C:R[-2]C)" xlApp.Range("E15").Value = "=SUM(R[-13]C:R[-2]C)" xlApp.Range("F15").Value = "=SUM(R[-13]C:R[-2]C)" xlApp.Range("G15").Value = "=SUM(R[-13]C:R[-2]C)" 'wkbk.Save 'Set wkbk = Nothing 'Set xlApp = NothingEnd Function Thanks,Kent |
|
kdyer
Yak Posting Veteran
53 Posts |
Posted - 2007-05-21 : 12:07:02
|
I was able to get some help from a friend of mine, who is a VB Goddess!quote: It indicates you need one more line of code right before the 'end function' line. http://www.tek-tips.com/viewthread.cfm?qid=712891 link:
Thanks,Kent |
|
|
|
|
|