Tables/Views

C

CB

I have created a custom view that calls a custom table. Does anyone have a
code example that would allow me to create these by vba rather than living in
the .mpp file. I would like to keep this restricted so that not just anyone
could add a field. I am using 2002.
 
J

John

CB said:
I have created a custom view that calls a custom table. Does anyone have a
code example that would allow me to create these by vba rather than living in
the .mpp file. I would like to keep this restricted so that not just anyone
could add a field. I am using 2002.

CB,
You want to use the ViewEdit and TableEdit Methods in VBA. Normally you
don't even need to edit the view, all you need to do is to create the
field table that the current view uses.

To prevent the customized view and/or table from staying with the file
when it is saved, use the OrganizerDeleteItem Method at the end of your
macro code.

I don't quite understand your next to last sentence. Unless a file is
password protected, a user will always be able to add whatever fields
they want to the current view.

Hope this helps.
John
Project MVP
 

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