How can I get a value to return in a VB Script so it will be part of the file path name

Joe Brown
Joe Brown used Ask the Experts™
on
Please see below document which is a screen shot. I would like for the ML_LOTSERIALNO$ to return the value to the file path where I have noted 'value'. How can I write the script so that it wit will do this?
Doc3.doc
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
Could you specify more details and complete requirements

regards
Prashanth
I'm not really sure what you mean but I'm wondering if you want...
objShell.ShellExecute("M:\Quality Logs\Quality Logs\\Master-CofA File\" & ML_LOTSERIALNO$ & ".pdf")

Open in new window

Joe BrownIT Manager

Author

Commented:
I hava tried this and I get an error on script line #27

  27 : objShell.ShellExecute("M:\Quality Logs\Quality Logs\Master-CofA File\" & ML_LOTSERIALNO$ & ".pdf")

I attached a screen shot of the error I received
Doc2.doc
Joe BrownIT Manager

Author

Commented:
I removed the $ from the field name and it worked! :) This is the final code that I used.
Thank you!

' Use ShellExecute to open a particular file
Set objShell = CreateObject("Shell.Application")

objShell.ShellExecute( "M:\Quality Logs\Quality Logs\Master-CofA File\" & ML_LOTSERIALNO & ".pdf" )

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial