How to use variable for file name in FileSaveAs VBA statement

A

andy.novak

Folks, I'm using the statement below, but get the error "Run-time
error 1101: The argument value is not valid"

FileSaveAs Name:="<>/" & TeamAbStr, FormatID:=""

What do I need to change in order to be able to use the variable for
the project name?

Thanks,
Andy Novak
UNT
 
A

andy.novak

Try \ instead of / and I would leave out the formatid so just use:

FileSaveAs Name:="<>\" & TeamAbStr
--

Rod Gill
Microsoft MVP for Project

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

Rod, that worked just fine. Thank you so very much. I thought I had
run out of all the different things to try :)
 
R

Rod Gill

Glad to have helped! Sometimes it's easier to work out what it isn't than
what it is!

--

Rod Gill
Microsoft MVP for Project

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



Try \ instead of / and I would leave out the formatid so just use:

FileSaveAs Name:="<>\" & TeamAbStr
--

Rod Gill
Microsoft MVP for Project

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

Rod, that worked just fine. Thank you so very much. I thought I had
run out of all the different things to try :)
 

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