you can do this by either adding the variables to the "ReadOnlyVariables" property on the Script tab and then you can access them using the dts object:
[font="Courier New"]Dts.Variables("variable name").Value[/font]
- remember to cast the object to the type you require
Or, you can lock the variable directly (you don't need to add the variables to the ReadOnlyVariables section for this):
[font="Courier New"]Dim vars As Variables
Dts.VariableDispenser.LockOneForRead("variable name", vars)
Dim variableValue As String = vars(0).Value.ToString
vars.Unlock()[/font]
Life: it twists and turns like a twisty turny thing