Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50070

Data being cleared in cells when OK pressed on msgbox

$
0
0
Hi,

I have the code below for a msgbox to prompt the user when particular cells have no value, this is within a Macro to copy data to a master sheet. For some reason when I click OK on the msgbox the cells are then emptied.

Code:

Select Case True
   
Case True: ws1.Range("FinancialControlsData", "CompetenceData") = ""
    MsgBox "All fields need to be completed, please complete then resubmit", vbExclamation
 
If True Then Exit Sub
   
End Select

Can anyone explain how I can prevent this?

Thanks

Viewing all articles
Browse latest Browse all 50070

Trending Articles