mcrmg
asked on
ActivexX InputBox
Hi,
In ActiveX, is there a way to take imput from user and then do some validation. User can click on eithere OK or CANCEL to proceed or quit DTS? Thx
In ActiveX, is there a way to take imput from user and then do some validation. User can click on eithere OK or CANCEL to proceed or quit DTS? Thx
ASKER
lol............
You are right........ I meant the person who use this DTS.... (in this case, it would be me........)
Sorry for the confusion...
You are right........ I meant the person who use this DTS.... (in this case, it would be me........)
Sorry for the confusion...
Add an ActiveX script and use something like this:
Function Main()
Dim Value
Dim IsValid
Value = InputBox("Enter value here", "")
' Do validation here and set the IsValid variable appropriately
If IsValid Then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If
End Function
Then set your Workflow to only proceed if the previous task is successful.
And finally, don't even attempt to schedule this DTS package :)
Function Main()
Dim Value
Dim IsValid
Value = InputBox("Enter value here", "")
' Do validation here and set the IsValid variable appropriately
If IsValid Then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If
End Function
Then set your Workflow to only proceed if the previous task is successful.
And finally, don't even attempt to schedule this DTS package :)
ASKER
This is what I try to do, something like this:
When I enter a value, say, 9
it will take that 9 and show in msgbox, say, September
If I click on OK, DTS will proceed, if I clcik on CANCEL, DTS will quit. possible? Thx
When I enter a value, say, 9
it will take that 9 and show in msgbox, say, September
If I click on OK, DTS will proceed, if I clcik on CANCEL, DTS will quit. possible? Thx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
I was trying the code, then for some reason that I can not find the panel that I can put in the code. When double click on Activex in dts, it pops up ActiveX Script Task Properties, How can I open the panel that I can write the code? Thx
I was trying the code, then for some reason that I can not find the panel that I can put in the code. When double click on Activex in dts, it pops up ActiveX Script Task Properties, How can I open the panel that I can write the code? Thx
ASKER
usually, there is "language" on left hand side, and a panel for coding on right hand side, the one on right hand side disappeared.......
>>When double click on Activex in dts, it pops up ActiveX Script Task Properties, How can I open the panel that I can write the code?<<
No idea what could be happening. I just created a new package and single clicked on the ActiveX Script Task icon on the left and the new window opened to enter the code.
No idea what could be happening. I just created a new package and single clicked on the ActiveX Script Task icon on the left and the new window opened to enter the code.
ASKER
very strange, if I work on the server directly, it is fine. But if I open it on client, I do not have edit area.......
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Patrik