Getting Argument Not Optional Error Marked in Red
NimishK
Code:
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
ws.Activate
Mnth = Me.ComboBox1.Column(1, Me.ComboBox1.ListIndex)
For i = 1 To Day(DateSerial(Year(Date), Mnth + 1, 1) - 1)
ws.Cells(i, 1).Value = Format(DateSerial(Year(Date), Mnth, i), "dd-mmm-yy")
With ws
[B] .Range("B" & i).Formula = "=SUMIF('Data'!C3:K7" & "," [COLOR=#ff0000]& .Range & "(A" & i & "),[/COLOR]" & " 'Data'!D3:L7" & ")"[/B]
End With
Next i