PDA

View Full Version : Message box pop up for command button



Rem0ram
04-18-2013, 03:38 AM
Hi all

I have a commandbutton which triggers a macro and its working fine.

But i want to have a information about that command button when user places the cursor.

Is there any option in excel command button properties that i can use?

Best
Rem0

JKwan
04-18-2013, 06:31 AM
is the what you wanted?

CommandButton1.ControlTipText = "blah"

Rem0ram
04-18-2013, 06:37 AM
HI

Thanks !

But not sure where i need to include this?

Best
Rem0

JKwan
04-18-2013, 06:58 AM
My initial assumption was that your request was for a button on a form.... however, given your inquiry, this sounds as thou it is a button on the spread sheet. Now, what type of control are you using? Is it ActiveX or Forms control, because this makes a big difference! If it is ActiveX, then you are in luck. Forms control, then as far as I know, you cannot do it. Let me know what you have and then proceed.

Kenneth Hobs
04-18-2013, 07:01 AM
I tried to reply earlier but the message was lost due to server busy.

What information did you want? By cursor, maybe you mean when you select a cell or cells? If that is the case, you want the code in the WorkSheet's Selection event. Otherwise, I am guessing that you want code in the commandbutton's Click event.

How to use or show the information? MsgBox(), Userform TextBox Control, Application.StatusBar, etc.

Dibbley247
04-18-2013, 02:01 PM
How about a standard Msg box at the start of the macro?

saiedbiram
04-19-2013, 12:38 PM
HI

Thanks !