Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Links to multiple Checkboxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bahboosh - 28 Jul 2006 14:44 GMT
I'm trying to link a range of cells that include checkboxes to an
adjacent column, but i dont want to go into each cell and link them
seperatley. Is there an easier way to do this?
Ex.:

A1:A100 include the checkboxes

C1:C100 linked cells

Thanks
Dave Peterson - 28 Jul 2006 16:05 GMT
There are two types of checkboxes--from the forms toolbar and from the control
toolbox toolbar.

Option Explicit
Sub testme01()
   Dim CBX As CheckBox
   Dim OLEObj As OLEObject
   
   For Each CBX In ActiveSheet.CheckBoxes
       CBX.LinkedCell = CBX.TopLeftCell.Offset(0, -1).Address(external:=True)
   Next CBX
   
   For Each OLEObj In ActiveSheet.OLEObjects
       If TypeOf OLEObj.Object Is MSForms.CheckBox Then
           OLEObj.LinkedCell _
               = OLEObj.TopLeftCell.Offset(0, -1).Address(external:=True)
       End If
   Next OLEObj
End Sub

The .topleftcell.offset(0,-1) means to use the column to the left of the
checkbox.

The CBX code does the Forms toolbar checkboxes.  The OLEObj code does the
Control toolbox toolbar checkboxes.

> I'm trying to link a range of cells that include checkboxes to an
> adjacent column, but i dont want to go into each cell and link them
[quoted text clipped - 6 lines]
>
> Thanks

Signature

Dave Peterson

Dave Peterson - 28 Jul 2006 16:50 GMT
Ps.  I'd use

.topleftcell.address(external:=true)

And format those cells (whole column???) with a custom format of:

;;;
(3 semicolons)

The cells look empty except when you look at the formula bar.

> There are two types of checkboxes--from the forms toolbar and from the control
> toolbox toolbar.
[quoted text clipped - 36 lines]
>
> Dave Peterson

Signature

Dave Peterson


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.