I guess Alen is saying that he does not know the path at run time. The GetPathAndFile routine requires a valid path(hard coded).
Alen, I had a similar issue, I did was store that off in a ini file, but then there is no clear way to read the INI file using BWS VBA functions, you may have to use Win32 api, which is not recommended. --Ranjit ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence, Mitchell Sent: Wednesday, January 16, 2008 10:42 AM To: [email protected] Subject: RE: [Talk] Visual Basic App.Path Work Around If you know the full path of something you can extract the individual pieces: Sub GetPathAndFile(FullPath As Variant) ' This subroutine takes a FullPath and will return the Path and File from that FullPath ' Ex: GetPathAndFile ("C:\Path\To\File.txt") will give ' SrcPath = "C:\Path\To" ' SrcFile = "File.txt" iCount = InStrRev(FullPath, "\") SrcFile = Mid(FullPath, iCount + 1) SrcPath = Mid(FullPath, 1, iCount - 1) End Sub Thank you, Mitch Lawrence Lead Applications Analyst Technical Support - NPR/Automation CHRISTUS Information Management *: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Send a "thank you <http://intranet.christushealth.org/spiritBuck/Default.asp> " to someone! ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Van Grinsven Sent: Wednesday, January 16, 2008 10:34 AM To: [email protected] Subject: RE: [Talk] Visual Basic App.Path Work Around app.path = the directory where the application was run eg. my app is located in C:\MYAPPPATH\myapp.exe app.path will equal "C:\MYAPPPATH\" ................................... Brian Van Grinsven Integrated Systems Specialist Medbuy Corporation mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> http://www.medbuy.ca <http://www.medbuy.ca/> T: 519.652.1688 ext. 114 F: 519.652.2788 Technical Support: ext. 199 or [EMAIL PROTECTED] Building Partnerships in Healthcare "Brian Stevenson" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/16/2008 11:30 AM Please respond to [email protected] To <[email protected]> cc Subject RE: [Talk] Visual Basic App.Path Work Around What does the app.path tell you or what information is stored there? Brian Stevenson - Systems Administrator University Health System - Business Information Systems Office: (210) 358 - 9282 Pager: (210) 756 - 0582 Fax: (210) 358 - 9287 ________________________________ From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Gersh, Alan Sent: Wednesday, January 16, 2008 10:27 AM To: [email protected] Subject: [Talk] Visual Basic App.Path Work Around Hello, I have recently join the Boston Workstation family of customers. I am working on converting our current Meditech scripts to the Boston Workstation environment and have run into a small snag. Some of our current scripting code uses the visual basic App.Path property. I have been informed that Boston Workstations VBA environment does not support the App object and does not have a equivalent to the App.Path property. Has anyone found or develop a work around? Alan Gersh Systems Analyst, Information Technology Department Martin Memorial Health Systems, Inc. Phone: 772.223.5945 ext: 4825 Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ********************************************************************** This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. ********************************************************************** This email may contain material that is confidential, privileged, and/or attorney work product for the sole use of the intended recipient. Any review, reliance, or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
<<image001.jpg>>
