TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 270
- Office Version
- 365
- Platform
- Windows
Hello,
I have a sheet with a button on it "clear template". If the user presses it, a macro is triggered that clears the contents of about forty cells. At the moment I have a raft of
etc. Is there a way I can put all the cells into a range and then just clear contents that way?
Many thanks!
I have a sheet with a button on it "clear template". If the user presses it, a macro is triggered that clears the contents of about forty cells. At the moment I have a raft of
VBA Code:
Range("D6").Select
Selection.ClearContents
Range("D8").Select
Selection.ClearContents
Range("D10").Select
Selection.ClearContents
etc. Is there a way I can put all the cells into a range and then just clear contents that way?
Many thanks!