Pass variable to Report Header

M

MartyO

I have placed a macro that runs a customized report on my View Menu. It
prompts the user for "using resource" info. When the user chooses the
resource, when can I initialize a Public Variable and then referrence that in
the report Header?
I'm very familiar with doing this with VBA on an MS Access report, and am
new at doing this in Project. Just don't know how to get to the formatting
events on the report.

This is the only line of code in the module right now. The macro recording
generated it for me.
ReportPrintPreview Name:="myToDoList"

Thanks in advance!
Marty
 
M

MartyO

Okay, well, I've gotten a little further. Now the module reads...
Dim strUserName
strUserName = "MartyO"
FilePageSetupHeader Name:="myToDoList", Text:="&[Report] as of &[Date]"
& Chr$(10) & "&[Project Title]" & Chr$(10) & strUserName
ReportPrintPreview Name:="myToDoList"

This does what I want it to do, except i want to pass the Resource Name from
the Using Resource dialog box to the strUserName variable.
 

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