ellehcer08
New Member
- Joined
- Jul 25, 2011
- Messages
- 31
Hi! I need to know when the command button is clicked, it will return a specific text or number... Like when I need to click "RESET BUTTON", it will clear the contents is the given range with this code:
Private Sub CommandButton1_Click()
Range("c8:c42").ClearContents
End Sub
But what will be the code if I want to clear a certain range of cells and return a default number "1".
Please help, I'm really confuse with the codes.
And also, if I am using a textbox, and I want to put the number there, and I want to clear that too, what will be the code?
Thanks a lot... Hope someone will help me on this..
Private Sub CommandButton1_Click()
Range("c8:c42").ClearContents
End Sub
But what will be the code if I want to clear a certain range of cells and return a default number "1".
Please help, I'm really confuse with the codes.
And also, if I am using a textbox, and I want to put the number there, and I want to clear that too, what will be the code?
Thanks a lot... Hope someone will help me on this..