View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Frederick Chow Frederick Chow is offline
external usenet poster
 
Posts: 75
Default Accessing local workstation's TEMP directory

Thanks for your quick response, but are there some Windows API that return
the Temp directory of a local workstation? Your approach only checks if the
temp directory is "C:\TEMP".

Frederick Chow

wrote in message
oups.com...
Hi
(Not Tested)

ChDrive "C:"
ChDir ("C:\Temp")
Do Events

Will change to the C:\Temp folder. Save and so on will be to this
folder. You might want to put this into an "On Error Return Next"
incase there is no C:\Temp

on error return next
Err.Clear
ChDrive "C:"
ChDir ("C:\Temp")
Do Events
If err.number<0 then
msgbox "There is no C:\temp folder!"
end if
on error goto 0

regards
Paul