Temp Files in Vista

R

RobV

I just tried running one of my macros under Vista, and it failed. I have
traced the problem to the code where I create a copy of the schedule in the
C:\Temp folder--Vista doesn't seem to care for that. Any suggestions on how
to set up a temp file under Vista via VBA code?
 
R

Rod Gill

If your IT dept has locked down the root folder, then use the
activeproject.fullname property to get the current folder and file name,
then save the temporary file with the same name, but change the file type or
name.

EG

Filesaveas left(activeproject.fullname, len(activeproject.fullname)-4) &
".bak"
--

Rod Gill
Microsoft MVP for Project - http://www.project-systems.co.nz

Author of the only book on Project VBA, see: http://www.projectvbabook.com




Jan De Messemaeker said:
Hi,

Put it in C:\, and delete it after the run (maybe even in your code)

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf




__________ Information from ESET Smart Security, version of virus
signature database 4966 (20100322) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4966 (20100322) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
L

Lars Hammarberg

You could try using the current user's temp folder in which the user always
have read/write permissions:

strTempFolderPath = VBA.Environ$("Temp")

Make sure you delete the file afterwards or use an unique file name each time.
 

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

Top