Associate
I know nothing of VBA, plunged into the deep end today and learning as I go.
I'm trying to do something very simple in a stock sheet, when you click on the button, it subtracts several cells and adds a date stamp.
This is what I've got.
Compile Error:
Unexpected End With
Can anyone help?
I'm trying to do something very simple in a stock sheet, when you click on the button, it subtracts several cells and adds a date stamp.
This is what I've got.
When I try to run it, I get the error message.Private Sub CommandButton1_Click()
'Subraction
For i = 3 To 11
Range("B" & i).Value = Range("B" & i).Value - Range("C" & i).Value
Next i
'Date Stamp
With Range("G3:G11")
.Value = Date
.NumberFormat = "dd/mmm"
End Sub
Compile Error:
Unexpected End With
Can anyone help?