How Do you program a Macro to run a wizard?

R

Richard

Hi,
I am running Project 2003 standard (Professional has been ordered but not
arrrived yet)
I need to frequently run the Analyze Time Scaled Data in Excel wizard, and
would like to automate the process with a macro. ie Select ONLY Actual Cost
and BCWP, supply a date range and set the frequency to "Weeks".
When I use "record new macro" nothing shows up for any wizard.
Alternatively, how to I recreate what this wizard does within a macro.

--
Cheers
Richard
aka CX500ricardo
`O=V"O*
Keep the rubber side down :)
 
J

John

Richard,
Unfortunately the "analyze timescaled data in Excel" cannot be
pre-programmed for certain options. The code for the add-in itself can
be modified however (see below).

If you have experience with VBA the procedure performed by the add-in
can be replicated and customized with your own macro. The code isn't
that difficult but it will require some time to set up. If you do not
have VBA experience you can,
a. learn VBA and write you own macro (more on that later)
b. have someone who does have VBA experience write a macro for you
c. continue to use the wizard and live with the inconvenience of always
having to manually select the options.

Another option if you do have some VBA experience is to download the
source code for the add-in and modify it yourself. Go to:
http://microsoft.com/downloads/details.aspx
You will need VB.net to modify that code however. If you have Project 98
available to you, the original VBA code for the add-in is included with
the Project 98 installation.

If you are interested in learning VBA, go to the MVP website at:
http://www.mvps.org/project/links.htm
At the bottom of the page look for a link to: "Project 98 visual basic
environment training materials". Although it says it is for Project 98,
the training material is equally applicable to all newer versions of
Project. In addition to the training materials, you might also like to
visit the MVP website for links to some VBA sample code. Go to:
http://www.mvps.org/project/vbacode.htm

If you would like someone to write a macro for you, several of us
(including myself) can do that. If you are interested in this approach,
you may contact me direct.

Hope this helps.
John
 
J

JackD

John said:
Richard,
Unfortunately the "analyze timescaled data in Excel" cannot be
pre-programmed for certain options. The code for the add-in itself can
be modified however (see below).

If you have experience with VBA the procedure performed by the add-in
can be replicated and customized with your own macro. The code isn't
that difficult but it will require some time to set up. If you do not
have VBA experience you can,
a. learn VBA and write you own macro (more on that later)
b. have someone who does have VBA experience write a macro for you
c. continue to use the wizard and live with the inconvenience of always
having to manually select the options.

Another option if you do have some VBA experience is to download the
source code for the add-in and modify it yourself. Go to:
http://microsoft.com/downloads/details.aspx
You will need VB.net to modify that code however. If you have Project 98
available to you, the original VBA code for the add-in is included with
the Project 98 installation.

Actually, you can do this even if you do not have vb.net. You can take the
code from form5 (I think) which does the actual work and use it in a normal
VBA macro with just a bit of clean-up.

-Jack
 
J

John

Jack,
Yes, you are probably right. A while back when I posted a query on the
download version, it was the forms I couldn't load without VB.net. I was
able to see the actual code but it would probably be more confusing than
ever to someone not familiar with all the forms and code for the add-in.
I believe it would take more than "just a bit of cleanup".

John
 
R

Richard

Thanks for the help John,
my programming skills are good, thanks for the offer of help. Running a
modified version of the source code seems like the best option. It would not
be necessary to show the pretty pictures (forms) that the wizard has ;)
I am downloading the source code now and will tackle this today.
Thanks
Richard
 
R

Richard

John said:
Jack,
Yes, you are probably right. A while back when I posted a query on the
download version, it was the forms I couldn't load without VB.net. I was
able to see the actual code but it would probably be more confusing than
ever to someone not familiar with all the forms and code for the add-in.
I believe it would take more than "just a bit of cleanup".

John
I think I am up to the task but I need some more help with getting the
wizard source code please........
I have downloaded analyzetsdata.exe and extracted the files from
http://www.microsoft.com/downloads/...70-e38e-45d5-91d3-65987f459cac&DisplayLang=en
The relevant files that I see are five .frm files, five .frx files and one
..bas.
The .bas I can open with VB in Project, but the .frm and .frx I cant (error
message is "the form class contained in .... is not supported"), and they
have the essential code. The .bas file only has some common setup code. Would
you mind opening these and sending the macro parts as plain text to me?
Please use address richard b at c f c l dot com dot au (remove spaces and
translate the at and dot)
Thanks
Richard
ps please post here first if you are sending to me, so others know and I
only get one copy :)
 
J

John

only get one copy :)

Richard,
I can't help you (since I don't have VB.net) but perhaps someone else
can. As I mentioned in my first response in this thread, if you have
Project 98, or know someone who does, all the forms and code are
directly available via VBA. Note: even though I have Project 98 I cannot
send the code due to licensing.

You know, it would probably be a whole lot quicker just to develop your
own VBA code. That's what I (and several others) do.

John
 
R

Richard

John said:
You will need VB.net to modify that code however. If you have Project 98
available to you, the original VBA code for the add-in is included with
the Project 98 installation.
John, I have installed a copy of Project 98 and found the Wizard on the
Analysis toolbar (it runs just fine) but I cant find the source code. Do you
know what it is called or where it is.
I also checked the install CD and still could not find it.
Thanks
Richard
 
R

Richard

Richard said:
John, I have installed a copy of Project 98 and found the Wizard on the
Analysis toolbar (it runs just fine) but I cant find the source code. Do you
know what it is called or where it is.
I also checked the install CD and still could not find it.
Thanks
Richard

D'oh! Right under my nose in the GLOBAL.MPT
I was expecting a separate file, so I overlooked the obvious.
Cheers
Richard
 

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