I am trying to use VBS to start some applications, one of which is an Access DB. I am a novice with VBS and this code was used for another project. I borrowed the part I thought might work for me. Here is my code so far:
Dim Fn,Fn1,FSO
dim sQuote
sQuote = chr(34)
Fn="\System Access Tracker" 'Change value here
Set FSO = CreateObject("Scripting.FileSystemObject")
s=FSO.GetAbsolutePathName(".")
s=s & Fn
Fn1= s &".mdb"
'Fn1 =sQuote & Fn1 & sQuote
msgbox Fn1
Wscript.Echo "File "&Fn1
Set sh= CreateObject("WScript.Shell")
returnVal = sh.Run (Fn1)
The msgbox equals d:\Profiles\jjs8542\Desktop\System Access Tracker.mdb. This is the true path to the Access DB.
I commented out the sQuote line but the code will not start the DB with or without it. There are no error messages when the code runs.
Thaks,
Dim Fn,Fn1,FSO
dim sQuote
sQuote = chr(34)
Fn="\System Access Tracker" 'Change value here
Set FSO = CreateObject("Scripting.FileSystemObject")
s=FSO.GetAbsolutePathName(".")
s=s & Fn
Fn1= s &".mdb"
'Fn1 =sQuote & Fn1 & sQuote
msgbox Fn1
Wscript.Echo "File "&Fn1
Set sh= CreateObject("WScript.Shell")
returnVal = sh.Run (Fn1)
The msgbox equals d:\Profiles\jjs8542\Desktop\System Access Tracker.mdb. This is the true path to the Access DB.
I commented out the sQuote line but the code will not start the DB with or without it. There are no error messages when the code runs.
Thaks,