Good morning,
I'm looking to have a macro stop my copy to word macro if a certain amount of cells are not filled in. Essentially, people need to fill out mandatory cells, so I implemented a simple =IF(COUNTA(E4,E5,E9,E10,E13,E14,E19,E32,E33,E35)<10,"Mandatory Cells Incomplete!","Mandatory Cells Completed!") function to make sure it was greater than the mandatory cells amount.
Now, I'm looking to have this below macro check to make sure that rule is met before running the word macro.
Sub CopyToWord1()
Dim objWord
Dim objDoc
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add
objWord.Visible = True
Range("A1:B53").Copy
objWord.Activate
objWord.Selection.PasteSpecial dcPasteAll
End Sub
I'm looking to have a macro stop my copy to word macro if a certain amount of cells are not filled in. Essentially, people need to fill out mandatory cells, so I implemented a simple =IF(COUNTA(E4,E5,E9,E10,E13,E14,E19,E32,E33,E35)<10,"Mandatory Cells Incomplete!","Mandatory Cells Completed!") function to make sure it was greater than the mandatory cells amount.
Now, I'm looking to have this below macro check to make sure that rule is met before running the word macro.
Sub CopyToWord1()
Dim objWord
Dim objDoc
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add
objWord.Visible = True
Range("A1:B53").Copy
objWord.Activate
objWord.Selection.PasteSpecial dcPasteAll
End Sub