DateFormat:=pjDateDefault causes error

G

graincar

Just doing a macro for a simple data export as text file from
Project. Have tried this on 98 and 2000 and get the same error.

The code goes like this:
OptionsView DateFormat:=pjDate_mm_dd_yy
'above give me simple date format
'then export as text file through a previously defined mapping
OptionsView DateFormat:=pjDateDefault
`above trying to set date format back to whatever it was

The error I get is "Run-time error '1101': The argument is not valid

if I change the last statement to:
OptionsView DateFormat:=0
the macro runs fine and does what I expect.

But why won't it accept the pjDateDefault constant? Any insights
would be appreciated. Thanks
 
J

Jack Dahlgren MVP

The only insight I can offer is that Project VBA doesn't always do what you
expect.
It was created by humans, so it is flawed.

-Jack Dahlgren
 
G

graincar

Thanks for your comment. At least I know (in this instance) it wasn't
me doing something dumb.
 

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