View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
scdallas scdallas is offline
external usenet poster
 
Posts: 2
Default Output file to My Documents

Thanks so much! It worked for me! I simply substituted
environ("UserProfile") in the portion of my Open statement where I had
hard-coded the location of MY My Documents folder and sure enough, my output
file was where I expected it to be!

Sue

"Gary Keramidas" wrote:

this has always worked for me. some say it doesn't, but i've never had any
issues.

environ("UserProfile") & "\My Documents\"

--


Gary


"scdallas" wrote in message
...
I'm trying to write a macro in a file located on a shared drive that will be
used by various members of my team. It needs to Open a file for Output and
I'd like it to save the file to the My Documents folder of whoever is running
the macro. Is there a way to do this either using the UserName in the file
name or can "My Documents" be identified without putting a full path (ie
c:\Documents and Settings\username\My Documents\...)? I'm using Excel 2003.