I have this code in Excel:
The VBS file has in the first few lines:
When the message box comes up, Excel's 'Default File Location' has taken over the actual path of the script file.
How can I fix this? I realize the other option is to convert the script from VBS to VBA but it uses Regular Expressions pretty heavily and I'm using Excel 97...
Thanks!
Onwards,
Q-
Code:
Option Explicit
Sub Run_VBS_File()
Dim WshShell As Object
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run "C:\xref\inventory.vbs"
End Sub
The VBS file has in the first few lines:
Code:
Set oFSO = CreateObject("Scripting.FileSystemObject")
sFullPath = oFSO.GetAbsolutePathName("inventory.vbs")
MsgBox sFullPath
When the message box comes up, Excel's 'Default File Location' has taken over the actual path of the script file.
How can I fix this? I realize the other option is to convert the script from VBS to VBA but it uses Regular Expressions pretty heavily and I'm using Excel 97...
Thanks!
Onwards,
Q-