Thread: [Solved] ckBox automation
View Single Post
 
Old 08-31-2012, 06:13 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,512
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi coconutt,

The issue is that your macro is only designed to update the 4th column from the 1st column's result. Try:
Code:
Sub MyMacro()
Application.ScreenUpdating = False
Dim TblRow As Long, TblCol As Long
With Selection
  TblRow = .Cells(1).RowIndex
  TblCol = .Cells(1).ColumnIndex
  .Tables(1).Cell(TblRow, TblCol + 3).Range.FormFields(1).CheckBox.Value = _
    .Tables(1).Cell(TblRow, TblCol).Range.FormFields(1).CheckBox.Value
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote