Classic ASP vs VBA

Differences between coding in VB in Classic ASP (aka VBScript) and VBA (aka Visual Basic for Application).
This is planned to be an ongoing post, get back here as we are discovering more and more differences.



My Own Work
1: ASP may not have Optional used in Sub or Function line
2: ASP cannot do Goto [confirmed]
3: ASP cannot assign type to function on function line
4: ASP Cannot have Dim Arra(1 to 9), just Arra(9)
5: ASP cannot do Next I to close a For loop, just Next
6: Gosub - Return DOES NOT work :(
7: Use FormatNumber() instead of Format()
8: ASP get type of variable using VarType(), 0,1,2,3,4,5,6,7,8,9,10, etc; see
 VBA get type of variable using TypeOf()
9: Use Cint() instead of Val()
10: Use Fix() instead of VAL()
 For Items 9 and 10
 Do not use cint in classic asp instead use fix
 fix() is like int(), cint is rounding and will not help here

Differences between Classic ASP vs VB.NET
1: Array definition and redim in ASP Classic as
 Dim Array()
 Rows = Rows + 1
 Redim Array(23, Rows)
Versus VB.NET
 Dim Array(1, 2)
 Rows = Rows + 1
 Redim Array(23, Rows)

Views 1466 Downloads 516

Files Learning Materials