View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ranmara Ranmara is offline
external usenet poster
 
Posts: 3
Default Disabling Print on TOOLBAR


Only thing I could think of would be to do a loop and store the index in a
global variable when you open sheet.

That way you would know the Index and be able to enable/disable as needed.

It always will say "Print ( " so that would be the test in the loop.

if left(control.caption,5) = "Print" then
global = control.index
exit loop
end if

"Dan Gesshel" wrote in message
...
Hello.

Okay... so maybe I was a little cocky, but I thought I had this solved.
I found out later I didn't.

I want to temporarily disable the Print button on the tool bar.
Unfortunately, it is forcing me provide the actual name of the Printer
on my network at the same time. For example my current code is:

CommandBars("Standard").Controls("Print (Marketing)").Enabled = False

This works great on my computer, but of course, not on anyone elses. I
need something that will disable it regardless of who is using it, and I
need it to work for both Excel 2000 and 2002 users. (Perhaps an idex
#??)

Can anyone help? I would appreciate it.

Thanks.

Dan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!