Results 1 to 5 of 5

[Solved] Center add check box

Threaded View

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    16

    [Solved] Center add check box

    I need the check box to be center in the cell right now there on the left side.
    Thank you


    Formula: copy to clipboard
    Sub AddCheckBoxes()
    On Error Resume Next
    Dim c As Range, myRange As Range
    Set myRange = Selection
    For Each c In myRange.Cells
    ActiveSheet.CheckBoxes.Add(c.Left, c.Top, c.Width, c.Height).Select
    With Selection
    .LinkedCell = c.Address
    .Characters.text = ""
    .Name = c.Address
    End With
    c.Select
    With Selection
    .FormatConditions.Delete
    .FormatConditions.Add Type:=xlExpression, _
    Formula1:="=" & c.Address & "=TRUE"
    End With
    Next
    myRange.Select
    End Sub
    Last edited by BioRoots; 09-18-2012 at 06:02 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1