Why am I getting "remote server does not exist or is unavailable?"

D

Dustin Ventin

I am using Microsoft Access VBA to open Microsoft Project and update the
project assignments with certain data from Access. To do this, I use VBA
code to open, update, and close Project, all automatically. The first time I
run this code it all works great. The second time around, it goes ahead and
opens the application, opens the project, but then comes up with:

"Remote server machine does not exist or is unavailable."

The problem is, all the applications and files are on my computer. It has
already connected and opened Project, not to mention the Project file. Why
would it suddenly have problems editing?

To bypass this, I can close and reopen the Access database, which seems to
solve the problem. The trouble is...I don't think my customer will be very
happy with it. Any suggestions?

Dustin Ventin
 
D

Dustin Ventin

A little more on the problem- I use the following code to open Microsoft
Project and the file:

Dim ProjApp As MSProject.Application
Set ProjApp = New MSProject.Application
ProjApp.Visible = True

ProjApp.FileOpen ("<C:\Dustin's
Stuff\ProjectOffice\ProjectOffice.mdb>\Dustin")

If I only use this code, I can open and close Microsoft Project as much as I
want by pressing that button, and I don't have to restart the database.
However, when I a line of code that actually does something with the
database, such as:

Msgbox("ActiveProject.Resources.Count")

....it will run perfectly the first time, and the second time through it will
complain that the server was not found or unavailable. I can only assume
that this is because of the ActiveProject code I am using...what exactly is
ActiveProject? How does it work? Do I have to do something with it to close
it correctly or what?

Thanks for your continued assistince.

Dustin Ventin
(e-mail address removed)
 
R

Rod Gill

Hi your msgbox code isn't actually doing anything with the database. When a
project opens, all data for it is read into memory (which is why a number of
Project's size limits are based on available memory. Nothing is written back
to the database, or read from it until the next file open or close. If
memory runs short, I believe it's sent to virtual disk memory, not the
database.

Msgbox(ProjApp.ActiveProject.Resources.Count) will display the number of
resources, but there is no read from the database to get this, all resources
are already in memory.


--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

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

Mark Durrenberger

Thank you thank you thank you...

Larry, Dustin may not be following this thread anymore but I just noticed it
and I'm glad I did...

You just solved a medium headache with your post....

Thanks for your time - If I can repay the favor let me know
Mark



--
_________________________________________________________
Mark Durrenberger, PMP
Principal, Oak Associates, Inc, www.oakinc.com
"Advancing the Theory and Practice of Project Management"
________________________________________________________

The nicest thing about NOT planning is that failure
comes as a complete surprise and is not preceded by
a period of worry and depression.

- Sir John Harvey-Jones
 

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