Help with Saving to a Folder

  • Thread starter Thread starter Justin Philips
  • Start date Start date
J

Justin Philips

I need to figure out how to programatically change the path name when
saving or to save to a folder using a macro. We use ID numbers to
access our computers and they show up in the path when we save ("My
Documents\ID number\folder..."). I want to know how I can just use
the last part of the path and let the reset default or something so
that the ID number for whoever uses the program doesn't matter. Any
other suggestions are welcome.
 
Justin,

This will give you the path to the desktop:


Sub Test()
Dim csFILENAME As String
Dim wsh As Object

Set wsh = CreateObject("wscript.shell")
csFILENAME = wsh.SpecialFolders.Item("Desktop") & "\"

MsgBox csFILENAME

End Sub
 
Justin,

This will give you the path to the desktop:

Sub Test()
Dim csFILENAME As String
Dim wsh As Object

Set wsh = CreateObject("wscript.shell")
csFILENAME = wsh.SpecialFolders.Item("Desktop") & "\"

MsgBox csFILENAME

End Sub

The problem is that I'm saving things that have the same name. I'm
trying to save them to a particular folder so that the repeats won't
be replaced.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top