Hi Excel Gurus
I was browsing through the forum to search for similar answers to my obstacle: "VBA code to check multiple cells in active worksheet if required field is blank" and found these two threads...
https://www.mrexcel.com/forum/excel-questions/366226-help-making-sure-all-data-filled.html
https://www.mrexcel.com/forum/excel-questions/366611-vba-check-if-blank-cell.html
I tried to integrate them to my code, but to no avail. I either get a "working code" but doesn't really do what I want it to do. Or I get an error when trying to run the code.
My current active sheet ("HRI Form") has multiple required fields that needs to be filled out prior to the data being deleted. And I currently have this code running:
I was planning to integrate an "IsEmpty" code to it but can't figure out how to...
The cell ranges that needs to be checked if empty would be G7:N7, G8:K8, L8:P8, L27:W27. If these ranges are blank then show message of "Please print and transfer data to the tracker. Thanks! ". Else show message of "Your data will now be wiped clean." then Call Clearcells module
Can anyone please help me.
Thanks a lot
I was browsing through the forum to search for similar answers to my obstacle: "VBA code to check multiple cells in active worksheet if required field is blank" and found these two threads...
https://www.mrexcel.com/forum/excel-questions/366226-help-making-sure-all-data-filled.html
https://www.mrexcel.com/forum/excel-questions/366611-vba-check-if-blank-cell.html
I tried to integrate them to my code, but to no avail. I either get a "working code" but doesn't really do what I want it to do. Or I get an error when trying to run the code.
My current active sheet ("HRI Form") has multiple required fields that needs to be filled out prior to the data being deleted. And I currently have this code running:
Code:
Private Sub Clear_Click()
Dim Msg As String, Ans As Variant
Msg = "Have you printed and transferred the data to the tracker?"
Ans = MsgBox(Msg, vbYesNo)
Select Case Ans
Case vbYes
Call Clearcells
Case vbNo
MyMessage = "Please print and transfer data to the tracker. Thanks! :)"
MsgBox MyMessage
GoTo Quit:
End Select
Quit:
End Sub
I was planning to integrate an "IsEmpty" code to it but can't figure out how to...
The cell ranges that needs to be checked if empty would be G7:N7, G8:K8, L8:P8, L27:W27. If these ranges are blank then show message of "Please print and transfer data to the tracker. Thanks! ". Else show message of "Your data will now be wiped clean." then Call Clearcells module
Can anyone please help me.
Thanks a lot