Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set CreateObject = VBA.CreateObject(Class$, ServerName$)
- Function CreateObject(className, serverName)
- '---- override the CreateObject
- ' function in order to register what
- ' object is being created in any error message
- ' that's generated
- Dim source, descr, errNum
- WScript.echo "In custom CreateObject"
- If Len(serverName) > 0 Then
- Set CreateObject = WScript.CreateObject(className, serverName)
- Else
- Set CreateObject = WScript.CreateObject(className)
- End If
- End Function
- Dim fso
- Set fso = CreateObject("Scripting.FileSystemObject", "")
- path = fso.GetAbsolutePathName(".")
- WScript.echo path
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement