Disable/Enable Toolbar Options

  • Thread starter Thread starter Dan Bair
  • Start date Start date
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
 
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
 
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
.
 
Back
Top