View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Command button and msgbox's

Candee,

Why not hide it (Visible property) rather than disable it?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Candee" wrote in
message ...

Hello everyone.

I have a worksheet that opens a simple userform when the file is opened
with 2 command buttons (bOwner and bUser). It checks to see who has
opened the file (Application.UserName), looks up the persons ID in a
list to determine if they are an owner or a user of the file. If the
person is not an owner, then the Owner button is disabled
(bOwner.Enabled = False). Each button has vba attached to hide or show
certain sheets in the file. I have disabled the "X" This part works
fine.

My question is, there are some people that will try to click the
"Owner" button even though it has been disabled. Can I have a message
box appear that tells them they have to choose the other button (even
though this one is disabled)?

TIA

Candee


--
Candee
------------------------------------------------------------------------
Candee's Profile:

http://www.excelforum.com/member.php...nfo&userid=638
View this thread: http://www.excelforum.com/showthread...hreadid=483581