Disable/Enable Toolbar Options

D

Dan Bair

Happy Thanksgiving Everyone;

I am developing in Office XP VBA. My project has several
maintenance screens and generates several reports. I
have a custom toolbar with "Export" and a Print icon on
it. They are used to export a report to a file or print
the report.

PROBLEM: When my users have generated a report and it is
displayed on the screen, I want the "Export" and Print
icon button to be active. When the user closes the
report, I want to disable those options. How do I do it?

Thanks,
Dan
 
N

Nikos Yannacopoulos

Application.CommandBars("Database").Controls
("&Print...").Enabled = true

This line of code works on Access's standard "Database"
toolbar, Print button. You'll have to modify accirdingly
for your toolbar and button names.

Nikos
 
G

Guest

Thanks Nikos;

It works great.

Dan
-----Original Message-----
Application.CommandBars("Database").Controls
("&Print...").Enabled = true

This line of code works on Access's standard "Database"
toolbar, Print button. You'll have to modify accirdingly
for your toolbar and button names.

Nikos
.
 

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