Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET DTSGlobalVariables gives runtime error Object Required

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hi experts,

I have a simple little DTS package - just tying to complicate things a bit by using a global variable.

I have defined a global var called "MonthsToKeep" in package properties -

I get an "Object Required runtime error" at the statement that is supposed to assign a value to the global variable...

I think I'm making this much too difficult.

Can you help?
Thanks, John


Function Main()

Dim intMonthsToKeep

intMonthsToKeep = PromptForMonths

MsgBox intMonthsToKeep 'have a good value here..for ex 48

***** Get VBScript runtime error here... Object Required *****
SET DTSGlobalVariables("MonthsToKeep").value = intMonthsToKeep
 
The problem is your use of the keyword 'SET'. SET requires an object, and the global variable does not qualify. Remove the SET keyword.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top