Joe
2009-03-03 17:39:08 UTC
I am modifying a DTS package that was built a few years back and
trying to add a simple transform using ActiveX. The ActiveX code that
I have is,
dim varFilename, varCardType
varFilename = DTSGlobalVariables("gv_ExcelLink").Value
'Remove file extension
varFilename = LEFT(varFilename,(LEN(varFilename)-4))
If RIGHT(varFilename,4) = "VISA" Then
varCardType = "Visa"
Else
varCardType = "Mastercard"
End If
Msgbox(varCardType)
'DTSDestination("CardType") = varCardType
I am trying to access the filename of the Source (which is held in a
GV) and depending on the filename of the source, insert either "Visa"
or "Mastercard". This code is returning the following error message,
"Wrong number of arguments or invalid property assignment."
The offending line seems to be, varFilename = DTSGlobalVariables
("gv_ExcelLink").Value, but if I preface this line with Set, then the
error goes away.
How can I accomplish this?
Thanks,
Drew
trying to add a simple transform using ActiveX. The ActiveX code that
I have is,
dim varFilename, varCardType
varFilename = DTSGlobalVariables("gv_ExcelLink").Value
'Remove file extension
varFilename = LEFT(varFilename,(LEN(varFilename)-4))
If RIGHT(varFilename,4) = "VISA" Then
varCardType = "Visa"
Else
varCardType = "Mastercard"
End If
Msgbox(varCardType)
'DTSDestination("CardType") = varCardType
I am trying to access the filename of the Source (which is held in a
GV) and depending on the filename of the source, insert either "Visa"
or "Mastercard". This code is returning the following error message,
"Wrong number of arguments or invalid property assignment."
The offending line seems to be, varFilename = DTSGlobalVariables
("gv_ExcelLink").Value, but if I preface this line with Set, then the
error goes away.
How can I accomplish this?
Thanks,
Drew