I'm trying to update a range of sequential cells to "Y" if the value of a combo box = "Y". I'm getting a method of range object error at the line in red font. The Else portion of the code works fine. Will I need to line out each individual range?
VBA Code:
If Me.cobo_All.Value = "Y" Then
mI.Range("E:O" & mINR).Value = Me.cobo_All.Value
Else
mI.Range("E" & mINR).Value = Me.cobo_AHPYN.Value
mI.Range("F" & mINR).Value = Me.cobo_ANHPYN.Value
mI.Range("G" & mINR).Value = Me.cobo_BTYN.Value
mI.Range("H" & mINR).Value = Me.cobo_CLYN.Value
mI.Range("I" & mINR).Value = Me.cobo_DAPYN.Value
mI.Range("J" & mINR).Value = Me.cobo_DisYN.Value
mI.Range("K" & mINR).Value = Me.cobo_FLYN.Value
mI.Range("L" & mINR).Value = Me.cobo_HPYN.Value
mI.Range("M" & mINR).Value = Me.cobo_PPYN.Value
mI.Range("N" & mINR).Value = Me.cobo_RPYN.Value
mI.Range("O" & mINR).Value = Me.cobo_TPYN.Value
End If