Hi
I have a macro which had been working fine, which had the following code:
With Range("Contact")
.Locked = False
.Copy
.PasteSpecial Paste:=xlPasteValues
.Interior.ColorIndex = 36
End With
where the range "Contact" is on the active sheet, and the active sheet is unprotected.
For some reason, the macro started throwing up an error box, titled 'Microsoft Visual Basic', showing only '400' (with OK & Help buttons).
I've fixed the problem, changing the 1st two lines to the following:
Range("Contact").Select
With Selection
but, I'd be interested in understanding why this has occurred.
Thanks,
PJ
I have a macro which had been working fine, which had the following code:
With Range("Contact")
.Locked = False
.Copy
.PasteSpecial Paste:=xlPasteValues
.Interior.ColorIndex = 36
End With
where the range "Contact" is on the active sheet, and the active sheet is unprotected.
For some reason, the macro started throwing up an error box, titled 'Microsoft Visual Basic', showing only '400' (with OK & Help buttons).
I've fixed the problem, changing the 1st two lines to the following:
Range("Contact").Select
With Selection
but, I'd be interested in understanding why this has occurred.
Thanks,
PJ