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 / December 2005

Tip: Looking for answers? Try searching our database.

format an entire column to contain checkbox activex control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
blunoob - 19 Dec 2005 09:26 GMT
I learned out how to insert one checkbox, but how do I insert them down an
entire row - copy paste paste special does not seem to work..
Norman Jones - 19 Dec 2005 14:07 GMT
Hi Blunoob,

Try:

'=============>>
Public Sub Tester01()
   Dim SH As Worksheet
   Dim rng As Range
   Dim rCell As Range

   Set SH = ActiveSheet                     '<<==== CHANGE

   Set rng = SH.Range("A1:A100")     '<<==== CHANGE

   Application.ScreenUpdating = False
   For Each rCell In rng
       With SH.CheckBoxes.Add(rCell.Left + 5, _
                                       rCell.Top - 2, 5, 5)
           .Caption = ""
           .LinkedCell = rCell.Address(0, 0)
       End With
       rCell.Font.Color = vbWhite
   Next rCell
   Application.ScreenUpdating = True

End Sub
'<<=============

If you are new to macros, you may wish to visit David McRitchie's 'Getting
Started With Macros And User Defined Functions' at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

---
Regards,
Norman

>I learned out how to insert one checkbox, but how do I insert them down an
> entire row - copy paste paste special does not seem to work..
 
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.