This may be what you are looking for:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim oPackage
Dim oTask
Set oPackage = DTSGlobalVariables.Parent
Set oTask = oPackage.Tasks("DTSTask_DTSExecuteSQLTask_1")
oTask.Properties("SQLStatement").Value = "SELECT * FROM [Table]"
Main = DTSTaskExecResult_Success
End Function