Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Command Button Properties

Hi there,

I have a command button on my worksheet that has a picture
rather than a caption. What do I need to do so that when
the mouse arrow settles on the button, the caption of the
command bar gets displayed?

Also I'm trying to match up the colours available on a
command button with the Fill Colour available on the Excel
tool bar and I can't get a match. I want Sky Blue but I
don't know the code.

Can you help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Command Button Properties

Hi

It's pretty awkward since the buttons don't have a "Mouse leave" or "Mouse exit" event. But see if this gets you started:

Private Sub CommandButton1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, _
ByVal X As Single, _
ByVal Y As Single)
With CommandButton1
Select Case X
Case 0 To 3
.Caption = ""
Case .Width - 3 To .Width
.Caption = ""
Case Else
Select Case Y
Case 0 To 3
.Caption = ""
Case .Height - 3 To .Height
.Caption = ""
Case Else
.Caption = "Yo"
End Select
End Select
End With
End Sub

As for colors, see Davids page http://www.mvps.org/dmcritchie/excel/colors.htm

--
HTH. Best wishes Harald
Excel MVP

Followup to newsgroup only please.

"Darren O'Connell" skrev i melding ...
Hi there,

I have a command button on my worksheet that has a picture
rather than a caption. What do I need to do so that when
the mouse arrow settles on the button, the caption of the
command bar gets displayed?

Also I'm trying to match up the colours available on a
command button with the Fill Colour available on the Excel
tool bar and I can't get a match. I want Sky Blue but I
don't know the code.

Can you help?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button Properties FredL Excel Discussion (Misc queries) 2 February 14th 08 08:20 PM
button properties Narasimha Excel Discussion (Misc queries) 4 October 16th 07 10:38 PM
Command Button Control Properties JosiahW Excel Discussion (Misc queries) 1 May 11th 07 08:45 PM
command button properties gbeard Excel Worksheet Functions 4 April 21st 05 06:02 AM
Spinner Button properties Ledge1 Excel Discussion (Misc queries) 1 December 8th 04 12:15 AM


All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"