Hello,
This is my first post to this forum, so I apologize in advance if I am in the wrong place. I am having a problem with a MsgBox (Excel 2010) that I'm hoping to get help with. The message box appears as expected, except when I click OK, it shows a second time. Clicking OK the second time then brings me back to cell C11. What I am trying to do is force the user to enter data into C11. If they click in C11 and do not enter anything, I want a message box to display asking them to enter the value. I'm not sure what I am doing wrong, and am also wondering if there is a better way of doing this.
Here is my code.
Thanks in advance!![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Sheets("Info").Range("C11").Value = “” Then MsgBox "Please provide your name" Cancel = True Range("C11").Select Cancel = True End If End Sub
Bookmarks