I am looking for an equivalent to JavaScript's "TRY ... CATCH" functionality.
My project is a web based VBScript application and I need it to perform a datasave as part of a separate set of VB functions during a button press.
The only snippet I could find to do the data save was a JavaScript snippet that uses TRY..CATCH - according to my VBScript help, there is no TRY command available. (and of course I cannot call a JavaScript function from within VBScript, otherwise there would not be any issue)
The JavaScript I need to convert to VBScript is as follows:
Any and all help is appreciated.
My project is a web based VBScript application and I need it to perform a datasave as part of a separate set of VB functions during a button press.
The only snippet I could find to do the data save was a JavaScript snippet that uses TRY..CATCH - according to my VBScript help, there is no TRY command available. (and of course I cannot call a JavaScript function from within VBScript, otherwise there would not be any issue)
The JavaScript I need to convert to VBScript is as follows:
Code:
<SCRIPT language=javascript>
Function SaveData(){
try { if (MSODSC.DataPages.Count > 0)
if (MSODSC.CurrentSection == null)
MSODSC.DataPages(0).Save();
else
MSODSC.CurrentSection.DataPage.Save(); }
catch (e)
{ alert (e.description);}
}
</SCRIPT>
Any and all help is appreciated.