Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I have this code in which the line in red is giving me an error ("Wrong number of arguments or invalid property assignment")
rwend = 27
It's such a messy line, that whatever the problem is I feel it's very subtle and hard to spot. Can somewhat spot the error? Is there a cleaner way of writing that same line possibly?
rwend = 27
Rich (BB code):
Sub process_surfaceconditions()
Application.EnableEvents = False
Application.ScreenUpdating = False
With ws_form
.Unprotect
With .Range("E" & rwend + 3 & ":E" & rwend + 8, "E" & rwend + 10 & ":E" & rwend + 11, "K" & rwend + 3 & ":K" & rwend + 8, "K" & rwend + 10 & ":K" & rwend + 11, "M" & rwend + 1)
.Value = ""
.Interior.ColorIndex = xlNone
End With
.Protect
End With
Application.EnableEvents = False
Application.ScreenUpdating = False
End Sub
It's such a messy line, that whatever the problem is I feel it's very subtle and hard to spot. Can somewhat spot the error? Is there a cleaner way of writing that same line possibly?