BarStyleFormat problem with 2007

S

SpaceCamel

I have a macro the creates a new Bar Style as part of the code. It worked
fine in MSP2003 but since upgrading to 2007 it is behaving strangely. Came
someone else duplicate this and get the same result? Solution?

This statement used to make a new Bar Style named Compare" at the end of the
list.
Run in 2007 I now get a new bar style named "Finish" or "ress" or some other
name that I have no idea where it come from.

Is the is new 'feature' in 2007?
-----------------------------
Sub testBarStyle()
GanttBarStyleEdit Item:="-1", Create:=True, name:="Compare",
MiddleShape:=4, ShowFor:="Normal", From:="Start3", To:="Finish3",
MiddleColor:=3
End Sub
 
S

SpaceCamel

BTW, I just tried the example code from msdn and also got a different name
than that in the statement.

Something wierd is going one here.
 
S

SpaceCamel

Looks this is a more basic problem than using VBA. The name will not 'stick'
even when I do a manual custum Bar Style either.

First manual attempt entering "Compare" turns into "ress" second time
"External tasks". Very strange. I need to see if this is repeatable on
someone elses MSP 2007. Maybe its just my copy.
 
R

Rod Gill

Hi,

I just tried it on my laptop and the code worked as expected with no
corruption of the style name.

Does the same thing happen in a different project if you run the code on it?
If not, then that project is likely corrupt. Save it to xml format then
re-open and save back to .mpp and try again.

If this fails, try repairing your installation of Project.
--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx
 
S

SpaceCamel

I just tried it on another computer w/MSP 2007 and instead of changing to a
different name it just deleted the name.

Looks like a bug in 2007.
==============================
 
S

SpaceCamel

Not Unique, Large intstiutional installation, Just got 2007 last week.
I will try it on other computer tomorrow,

When are you getting MSP-2007?
 
J

JulieS

Hi Space Camel,

I haven't tried your code but I have found bugs in Project 2007 relating
to task bars and I have logged them with Microsoft.

It seems to occur regularly with files created in Project 2003 and then
opened and saved as Project 2007 files. Running the Gantt Chart Wizard
corrupts the names of the task bars, replacing them with odd characters
or blanking them out completely.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 
S

SpaceCamel

Yes, That is the problem. Not even with the Wizard, just manually creating
BarStyles too.

I hope MS comes out with a fix. I am going to have to postpone releasing
one of my macros.

Thanks,
 
J

JulieS

Hi Space Camel,

It doesn't surprise me that you are seeing the problem with a macro as
well. Sorry I don't have a "fix" for you -- just the assurance that you
are not alone. :)

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional information
about Microsoft Project
 

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