It queries information from the reporting database tables, provides
the user with a dialog box from which to pick certain values, then
creates a project for them based on the values selected.
The code is fine in terms of what it does. There are times when I run
it the first time on a new machine, I wait at least a minute and
receive a timeout error. But when I immediately run it again from
then on after, it is fine. Happens with more than one macro that I've
written.
Andy,
When you say the "reporting database tables", are you referring to
Project's underlying database or some other database (e.g. Access)? If
it is the latter, I might suspect code to establish the link to the
database recordset is not getting set up initially.
You might also want to check that all the necessary references are set
for whatever object libraries you need.
Is there any error message when it times out?
This may be a cheap shot, but as a workaround, if you can't find a
definitive cause, try setting a precursor link to the database with a
controlled error routine using the "On Error Resume Next" code
structure. That should get you around the first run try.
John
Project MVP