MS Project Generated Message Box

C

Cole

All,

I'm looking to capture a MS Project generated message box. I'd like
to reference this built in object then I can perhaps set a property
that forces it to be on top. Specifically, it's asking me if I want to
delete a column for confirmation.

Since this message is a part of Project itself, I’m not sure how
access it.

Any help would be appreciated.

Cole
 
J

John

Cole said:
All,

I'm looking to capture a MS Project generated message box. I'd like
to reference this built in object then I can perhaps set a property
that forces it to be on top. Specifically, it's asking me if I want to
delete a column for confirmation.

Since this message is a part of Project itself, I¹m not sure how
access it.

Any help would be appreciated.

Cole

Cole,
I read Jack's suggestion but I'm not sure it will do what you want, but
then I'm not to sure I understand what you want anyway. First, here is
what is not clear - at least to me:
1. What do you mean by, "capture a MS Project generated message box."?
2. What "built in object"?
3. What do you mean by, "set a property that forces it to be on top."?

Second, for your reference columns in Project are not deleted, they are
only hidden. View columns in Project display project fields and those
can never be deleted. Task or resource rows on the other hand can be
deleted.

So, what exactly is it you want again?

John
Project MVP
 
M

Mike

Cole,
I read Jack's suggestion but I'm not sure it will do what you want, but
then I'm not to sure I understand what you want anyway. First, here is
what is not clear - at least to me:
1. What do you mean by, "capture a MS Project generated message box."?
2. What "built in object"?
3. What do you mean by, "set a property that forces it to be on top."?

Second, for your reference columns in Project are not deleted, they are
only hidden. View columns in Project display project fields and those
can never be deleted. Task or resource rows on the other hand can be
deleted.

So, what exactly is it you want again?

John
Project MVP

John,

Sorry about that after, I posted I realized my post wasn't clear
enough.

I'm building an add-in toolbar to MS Project. Part of the
functionality is I'm enabling the end-user to alter a table and view
from a form I created in the toolbar.

When the end-user makes the change a message box appears asking if
they 'Are sure they want to delete Number 1' field.

This message box hides behind the application on the screen and the
end-user has to select MS Project 'Windows' Taskbar on the bottom of
the screen for the message to appear.

Ideally I'd like to have the message box never show up. If that can't
happen I'd like to force it to in view so the user can just select
'OK'

Make sense?

Cole
 
J

John

Mike said:
John,

Sorry about that after, I posted I realized my post wasn't clear
enough.

I'm building an add-in toolbar to MS Project. Part of the
functionality is I'm enabling the end-user to alter a table and view
from a form I created in the toolbar.

When the end-user makes the change a message box appears asking if
they 'Are sure they want to delete Number 1' field.

This message box hides behind the application on the screen and the
end-user has to select MS Project 'Windows' Taskbar on the bottom of
the screen for the message to appear.

Ideally I'd like to have the message box never show up. If that can't
happen I'd like to force it to in view so the user can just select
'OK'

Make sense?

Cole

Cole,
OK, that does make a little more sense but I'm still confused by your
last paragraph. As I said, in Project fields can't be deleted so I'm
having a little difficulty understanding how or why the alert message is
appearing. Maybe it's an added "feature" you get with an add-in (I've
never created an add-in for Project so I'm not familiar with the details
associated with same).

With a normal userform created with VBA any code generated MsgBox
statements, (as Jack suggested), will appear on "top" of the userform
where they must be addressed (i.e. "OK", "cancel", etc.) before code
processing continues. Obviously your add-in is working differently.

Just for reference there is a DisplayAlerts property for the Project
application. Whether that will work in your case, I don't know but it's
worth a try. You want the sytax:
DisplayAlerts = False
The property is automatically set back to "True" when code execution
completes.

If that doesn't help, post back. Hopefully someone with Project add-in
experience can help.

John
Project MVP
 
M

Mike

Cole,
OK, that does make a little more sense but I'm still confused by your
last paragraph. As I said, in Project fields can't be deleted so I'm
having a little difficulty understanding how or why the alert message is
appearing. Maybe it's an added "feature" you get with an add-in (I've
never created an add-in for Project so I'm not familiar with the details
associated with same).

With a normal userform created with VBA any code generated MsgBox
statements, (as Jack suggested), will appear on "top" of the userform
where they must be addressed (i.e. "OK", "cancel", etc.) before code
processing continues. Obviously your add-in is working differently.

Just for reference there is a DisplayAlerts property for the Project
application. Whether that will work in your case, I don't know but it's
worth a try. You want the sytax:
DisplayAlerts = False
The property is automatically set back to "True" when code execution
completes.

If that doesn't help, post back. Hopefully someone with Project add-in
experience can help.

John
Project MVP

Thanks for the help on the Display alerts. I'm building the add-in
within VSTO not VBA. I'll try that.

The message box I'm getting seems to be a default with MS Project not
one that I programmed into the toolbar.
 
J

Jack Dahlgren

If you want to avoid a message box that project pops up, use

displayalerts = False

This will disable all those "you are going to do something are you really
sure you want to?" messages.

Don't forget to set it back to true when you finish.

-Jack Dahlgren
 

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