Runtime Error 1101

R

Red

I've been working on this problem for a couple of days now and can't work
out what's wrong with the below code. If anyone can help I'd really
appreciate it.

On FileSaveAs line it produces a Runtime Error 1101.

Set AP = ActiveProject
If AP <> "Definite ResPool" Then
If AP <> "Probable ResPool" Then
DBName = "<<\\Hta-nt1\Project_plans\Project_Server.mpd>\"
FileSaveAs Name:=DBName & AP, FormatID:="MSProject.MPD",
Map:="Contribution"
End If
End If
 
R

Rod Gill

Hi,

Record a macro of you saving to the .mpd file then compare the recorded
SaveAs code with the resulting string you create in your code. Therein will
lie the problem. Rather than use AP it is safer to use AP.Name

--
Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
 

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