Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel Help
#17
I found this script with a macro that automatically does part of it if I assign it to a key

Code:
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"
                .FormatConditions(1).Font.ColorIndex = 6 'change for other color when ticked
                .FormatConditions(1).Interior.ColorIndex = 6 'change for other color when ticked
                .Font.ColorIndex = 2 'cell background color = White
            End With
        Next
        myRange.Select
End Sub

Using this, I get stuck with the true/false linked to the same cell. I'd like for it to be in a parallel cell to the right. Anyone good with Visual Basic that could change that for me?
Reply


Messages In This Thread
Excel Help - by Sarah - 2011-06-28, 04:43 PM
Excel Help - by Kurtle - 2011-06-28, 04:52 PM
Excel Help - by Dusk - 2011-06-28, 05:06 PM
Excel Help - by Kalovale - 2011-06-28, 05:56 PM
Excel Help - by Sarah - 2011-06-28, 06:00 PM
Excel Help - by Jon - 2011-06-28, 06:02 PM
Excel Help - by Kalovale - 2011-06-28, 06:03 PM
Excel Help - by Sarah - 2011-06-28, 06:04 PM
Excel Help - by Jon - 2011-06-28, 06:08 PM
Excel Help - by Fiel - 2011-06-28, 06:23 PM
Excel Help - by White - 2011-06-28, 06:32 PM
Excel Help - by FelixTM - 2011-06-28, 07:07 PM
Excel Help - by Sarah - 2011-06-28, 09:01 PM
Excel Help - by Sarah - 2011-06-29, 10:44 PM
Excel Help - by Kalovale - 2011-06-30, 12:18 AM
Excel Help - by Sarah - 2011-06-30, 12:46 AM
Excel Help - by Sarah - 2011-06-30, 02:18 AM
Excel Help - by Fiel - 2011-06-30, 05:44 AM
Excel Help - by Sarah - 2011-06-30, 05:55 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)