I have a bug, as my sheet only clears the first line and the code doesn't make it to the second clear line, and it doesn't print the MsgBox to the screen. Any suggestions on what I need to do?
thank you worked like a charm, it is usefull if the code is in the descriptio or in a Comment. so here you go Private Sub NameOfYourButton_Click() Sheets("NameOfSheet").Range("A1:A1").Value = "" MsgBox "form cleared" End Sub
My Clear Form button is also clearing the Conditional Formatting in some of the cells. Some cells I have highlighted when they're blank and once data is entered in the cell the highlighting goes away. When I hit my Clear Form button the data in the cells clears as it should but many of the cells don't go back to being highlighted. If i click in those cells and hit Delete then the cell highlights again, so it's acting as though there's still data in the cell after I hit the Clear Form button. Why do only some cells do this? I've tried reformatting the cells, clearing and re-entering the Conditional Formatting, clearing and re-entering the code for the Form Clear button, and even to the point where I've cleared all formatting from those cells, recreated the cell and added the Conditional Formatting, but the same thing happens to the same cells over and over, no matter what I do. Any thoughts on why this is happening?
This is awesome. Is there a code to add a safety so it can’t be deleted by accident? For example, it won’t clear until you click on the “ok” in the msg box.
Add this below the first line of code. If MsgBox("This will erase everything! Are you sure?", vbYesNo) = vbNo Then Exit Sub Thanks for the great question. I have tested this. Link to author: stackoverflow.com/questions/8569389/add-are-you-sure-to-my-excel-button-how-can-i
have a calculation that I would like to put into excel if not in the vba form then make it do the calculation on the spread sheet once I have sent the day to the sheet the calculation is for determining the productivity rate of a excavator it looks like this: 3600s / hr x 3 cy x.85 divided by 20.S' / cycle X 50min/60min X 1/(1+35) the answer is 283.bcy/hr but I dont know how to write it in excel or vba
Thank you - great tutorial! Appreciate it
Life Saver!!!! GREAT instructions!!! Easy to follow!!
Thanks!
I have a bug, as my sheet only clears the first line and the code doesn't make it to the second clear line, and it doesn't print the MsgBox to the screen. Any suggestions on what I need to do?
thank you worked like a charm, it is usefull if the code is in the descriptio or in a Comment.
so here you go
Private Sub NameOfYourButton_Click()
Sheets("NameOfSheet").Range("A1:A1").Value = ""
MsgBox "form cleared"
End Sub
My Clear Form button is also clearing the Conditional Formatting in some of the cells. Some cells I have highlighted when they're blank and once data is entered in the cell the highlighting goes away. When I hit my Clear Form button the data in the cells clears as it should but many of the cells don't go back to being highlighted. If i click in those cells and hit Delete then the cell highlights again, so it's acting as though there's still data in the cell after I hit the Clear Form button. Why do only some cells do this? I've tried reformatting the cells, clearing and re-entering the Conditional Formatting, clearing and re-entering the code for the Form Clear button, and even to the point where I've cleared all formatting from those cells, recreated the cell and added the Conditional Formatting, but the same thing happens to the same cells over and over, no matter what I do. Any thoughts on why this is happening?
Sounds like a glitch. I would check on the forums.
hello. how do we reset selected radio buttons in a box (excel)? thank you so much
If you have the radio button linked to a cell (right click > Format Control > Cell Link) , then you can simply clear the linked cell.
DrRyanPhelps thank you so much . It’s a great help
This is awesome. Is there a code to add a safety so it can’t be deleted by accident? For example, it won’t clear until you click on the “ok” in the msg box.
Add this below the first line of code.
If MsgBox("This will erase everything! Are you sure?", vbYesNo) = vbNo Then Exit Sub
Thanks for the great question. I have tested this.
Link to author:
stackoverflow.com/questions/8569389/add-are-you-sure-to-my-excel-button-how-can-i
Thank you so much for your help!!
My pleasure!
Sir, can you please tell me where I can learn about excel VB and macros online for free.
Unfortunately, I do not know where you can find that. You may be able to get an old textbook on the cheap.
have a calculation that I would like to put into excel if not in the vba form then make it do the calculation on the spread sheet once I have sent the day to the sheet the calculation is for determining the productivity rate of a excavator it looks like this:
3600s / hr x 3 cy x.85 divided by 20.S' / cycle X 50min/60min X 1/(1+35) the answer is 283.bcy/hr but I dont know how to write it in excel or vba
You may find some help here: ruclips.net/video/9S05gvRXyZw/видео.html