Login | |
|
 |
RE: VBA code to vbscript - 10/17/2006 1:42:11 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
Well, the conversion from VBA to VBScript is usually relatively painless. In your case however, there is a fair amount of code that is missing. For instance I can tell that the code is part of a Function that has optional parameters. Optional parameters are not supported in VBScript so we would need to see the rest of the function to straighten out the logic to avoid the optional parameter. We do not know what the BuildCriteria function does so we can't tell you if the call you it is valid VBScript or not. I assume that rst is a recordset, but I can't know that for sure. I can't tell you if the things you are doing with rst are valid VBScript or not since I don't know how it is created. I have no clue what objTree is without seeing the code to create it. So basically we can't convert it without seeing all of it.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: VBA code to vbscript - 10/17/2006 2:49:59 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
Well, one of the web gurus will have to come along to address getting it all into a TreeView. For the general things, remove any "As XXXXXX" statements and change them to Dim commands. Get rid of the optional parameter for the AddBranch function. Get rid of any Labels and any Goto statements.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|