G
GB
Robert Stober said:Thank Andy! This worked for me! I edited your command as follows:
Set xlObj = CreateObject("Excel.application")
xlObj.Workbooks.Open "H:\licana\licuser\orders\22345585\template.xls"
xlObj.Quit
Can I use an environemnt variable inside VB? I want the order number
("22345585" in this case) to be contained in an enviroment variable. This is
what I do inside aVBA template:
Dim orderNum As Long
Dim fPath As String
orderNum = Environ("orderNum")
fpath = "H:\licana\licuser\orders\" & orderNum & "\template.xls"
Can I do this in VB? My book doesn't mention enviroment variables...
How about saving it in the registry instead? - use SaveSetting to store and
getsetting to get it back.
HTH
Geoff