Dynamic file location

  • Thread starter Thread starter fldennis
  • Start date Start date
F

fldennis

I have various forms in my applciation that reference a specific icon
files in my application under the path of my MDE. My code works fine if
the location doesn't change (ie C:\appname). But if the user has to
place the "MDE" in some other location (S:\appname) my code will not
work. What is the best way to handle this?
 
As long as the icon file is always in the directory where the MDE resides...
= CurrentProject.path & "\YourIcon.ico"
should work.
Al Camp
 
Thank you for your prompt reply.

I need to convert "CurrentProject.Path" to a string so that I can use
it in other code, what is the best way to do that?
 
Dim x As String
x = CurrentProject.Path
' or like how AlCamp shows
x = CurrentProject.path & "\YourIcon.ico"
 
Back
Top