If specific cells do not contain data I dont want the user to be able to use the copy macro.
If specific cells do not contain data I dont want the user to be able to use the copy macro.
the approach here will depend on how many "specific cells" are involved and by "copy macro" you mean something you wrote or a system macro.Originally Posted by Erays
If just a few cells and you wrote the copy macro then you might use something like this:
Sub CopyMacro if Cells(1,4)="" or cells(3.5)="" or cells(8,1)="" then msgbox "sorry, key cells are still empty; you can not copy",vbcritical + vbokonly exit sub end if end sub
If the target cells nicely group into a range, you could test for empty cells in that range, etc. One method to test is demonstrated in this KB
"It's not just the due date that's important, it's also the do date" [MWE]
When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.
Thanks works great!!!
glad to help. Please set thread to solved.
"It's not just the due date that's important, it's also the do date" [MWE]
When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.