Project/vba/Excel

B

Buster

How do I pop a msgbox in excel from MS-Project. I have tried the following;
xlApp.MsgBox("Macro Complete with " & Tcount & " Tasks Written") = True

and nothing happens. DO I need to include anything else syntactically?

Jeff
 
J

JackD

xlApp.visible = true
?
Why not pop up the message box from project
activate the project app and use msgbox.
 
J

John

Jeff,
When I run an exporting macro I always keep Excel in the background
(i.e. xlVisible = False). Then after the macro is finished exporting and
formatting the data in Excel I pop up a message box in Project saying
it's all done. Immediately thereafter I make Excel visible, set the xl
object to nothing and exit.

Except perhaps during debugging, I (or the user) doesn't need to see the
data actually being written to Excel. I either keep the user informed
about the macro's progress through a userform or with messages in the
application caption bar. The macro executes faster using this method and
all that really matters is the end result, not how it got there.

John
 
R

Rod Gill

Hi,

Try:
xlApp.MsgBox "Macro Complete with " & Tcount & " Tasks Written"

or display the msgbox in Project. Excel will need to be visible for the box
to display.

--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.project-systems.co.nz/
Email rodg AT project-systems DOT co DOT nz
 

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