I am trying to use the following code to set the values of some global variables in a DTS package:
It is giving me an error when I try to declare the variable strFileName, and set it's value using the inputbox. If I set the value of the two other global variables directly using inputbox, it works fine.
I'm guessing it's something really simple but I can't seem to figure it out - what's wrong with the syntax of my code?
Thank you,
Kevin
Code:
Function Main()
Dim strFileName as String
strFileName = InputBox("Enter file name without the file extension:")
DTSGlobalVariables("gVarSourceFileName").Value = "C:\Documents and Settings\kskinner\Desktop\NBC\Qwest CDRs\" & strFileName & ".csv"
DTSGlobalVariables("gVarImport_FileValue").Value = strFileName
Main = DTSTaskExecResult_Success
End Function
It is giving me an error when I try to declare the variable strFileName, and set it's value using the inputbox. If I set the value of the two other global variables directly using inputbox, it works fine.
I'm guessing it's something really simple but I can't seem to figure it out - what's wrong with the syntax of my code?
Thank you,
Kevin