Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Custom Checkbox control in Excel

Hello, I have a user who is asking if it is possible to create a custom
checkbox control for use inside of Excel. This new checkbox control is
essentially a checkbox control that has other graphics around the checkmark
other than a square.

For instance, he need to have a triangle that has a clickable checkmark
inside it. He needs a circle with a clickable checkmark inside as well as a
couple of other shapes that have a clickable checkmark inside (no square
around the checkbox). I've tried to put a regular checkbox on top of a
graphic but you have to deal with the square corners of the checkbox even if
it's set to transparent.

Anyone seen any code or otherwise on how to create a custom or add-in that
would do what I describe?

Thanks
Jim


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Custom Checkbox control in Excel

Jim

Create a circle (oval) from the Drawing Toolbar. Format the autoshape
(right click) and set the font to Wingdings (and the size and boldness to
suit) and set the alignment to Center for both horizontal and vertical.

Paste this code into a standard module

Sub CheckCircle()

With Sheet1.Shapes(1).TextFrame
If .Characters.Text = Chr$(252) Then
.Characters.Text = ""
Else
.Characters.Text = Chr$(252)
End If
End With

End Sub

Right click on the autoshape and choose "assign macro" and assign
CheckCircle to it. Whenever you click the circle, a check mark should
appear and disappear alternately. You can also experiment with different
fonts and different numbers in the Chr$() function to find a check mark more
to your liking.

--
Dick Kusleika
MVP-Excel
www.dailydoseofexcel.com
Jim wrote:
Hello, I have a user who is asking if it is possible to create a
custom checkbox control for use inside of Excel. This new checkbox
control is essentially a checkbox control that has other graphics
around the checkmark other than a square.

For instance, he need to have a triangle that has a clickable
checkmark inside it. He needs a circle with a clickable checkmark
inside as well as a couple of other shapes that have a clickable
checkmark inside (no square around the checkbox). I've tried to put
a regular checkbox on top of a graphic but you have to deal with the
square corners of the checkbox even if it's set to transparent.

Anyone seen any code or otherwise on how to create a custom or add-in
that would do what I describe?

Thanks
Jim



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Custom Checkbox control in Excel

Dick, you are a genius. I insist you take the rest of the day off.
Just tell them I said so!


Thanks!

Jim



"Dick Kusleika" wrote in message
...
Jim

Create a circle (oval) from the Drawing Toolbar. Format the autoshape
(right click) and set the font to Wingdings (and the size and boldness to
suit) and set the alignment to Center for both horizontal and vertical.

Paste this code into a standard module

Sub CheckCircle()

With Sheet1.Shapes(1).TextFrame
If .Characters.Text = Chr$(252) Then
.Characters.Text = ""
Else
.Characters.Text = Chr$(252)
End If
End With

End Sub

Right click on the autoshape and choose "assign macro" and assign
CheckCircle to it. Whenever you click the circle, a check mark should
appear and disappear alternately. You can also experiment with different
fonts and different numbers in the Chr$() function to find a check mark
more to your liking.

--
Dick Kusleika
MVP-Excel
www.dailydoseofexcel.com
Jim wrote:
Hello, I have a user who is asking if it is possible to create a
custom checkbox control for use inside of Excel. This new checkbox
control is essentially a checkbox control that has other graphics
around the checkmark other than a square.

For instance, he need to have a triangle that has a clickable
checkmark inside it. He needs a circle with a clickable checkmark
inside as well as a couple of other shapes that have a clickable
checkmark inside (no square around the checkbox). I've tried to put
a regular checkbox on top of a graphic but you have to deal with the
square corners of the checkbox even if it's set to transparent.

Anyone seen any code or otherwise on how to create a custom or add-in
that would do what I describe?

Thanks
Jim





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
HOW DO I GIVE A CONTROL TOOLBOX CHECKBOX A VALUE IN EXCEL? Paula Excel Worksheet Functions 0 March 6th 06 04:31 PM
how to delete or remove checkbox form control in Excel? tubbekans Excel Discussion (Misc queries) 1 December 14th 05 08:51 PM
Group Action of CheckBox Control in Excel 2000 Dan Fisher Excel Programming 1 September 2nd 05 10:24 AM
Programmatically set Excel 97 Control Toobar Checkbox object & container name Matt Jensen Excel Programming 19 January 10th 05 07:46 PM
VBA Control Checkbox Tommy[_6_] Excel Programming 2 August 7th 03 06:02 PM


All times are GMT +1. The time now is 03:30 AM.

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"