#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 142
Default ActiveX controls

Hi
Is it possible to designate a cell as a control box and link a macro to it
rather than using one of the ActiveX controls?

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default ActiveX controls

If you don't want an ACtiveX control, you could use a checkbox from the
Forms toolbar.

An alternative is this methiod which is invoked by selecting a cell

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "H10" '<=== change to suit

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
.Value = "a"
End If
.Font.Name = "Marlett"
.Offset(0, 1).Activate
End With
End If
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Luke" wrote in message
...
Hi
Is it possible to designate a cell as a control box and link a macro to it
rather than using one of the ActiveX controls?

Many thanks



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
ActiveX Controls Charly Excel Discussion (Misc queries) 1 October 18th 06 01:53 PM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
Anchoring Activex Controls KG Excel Discussion (Misc queries) 2 March 24th 05 07:51 PM
After installing Office XP SP3, Excel ActiveX controls are moved a RJR Excel Discussion (Misc queries) 2 March 19th 05 05:54 PM
ActiveX Controls Display Issue? [email protected] Excel Discussion (Misc queries) 0 March 5th 05 05:43 PM


All times are GMT +1. The time now is 06:41 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"