Change a default Excel warning

J

Jock

Hi,
Column D is locked when the worksheet is protected but the cells in that
column can be selected. If a user tries to enter text into any of the cells
in "D", the standard warning appears i.e. cell is protected and read only.
The cells can be double clicked which opens a user form into which the user
will enter the data. When that is closed, the data is transferred to the
locked cell by code.
My q is can the default warning message be replaced by one of mine for
instance informing the user to double click the cell?
Thanks.
 
M

Mike H

Jock,

No you can't change these messages but you could limit the risk of them
being displayed by trapping column D being selected and then immediatly
display your own message.

Right click the sheet tab and view code and paste this in

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 4 Then
MsgBox "Double click this cell to run a macro"
End If
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top