ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application.DisplayAlerts (https://www.excelbanter.com/excel-programming/326953-application-displayalerts.html)

TK

Application.DisplayAlerts
 
Hi:

The following does not stop the alert message box if
an attempt is made to enter data into a protected cell.
Any advice as to how to stop the alerts would be greatly
appreciated.

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Unprotect
Application.DisplayAlerts = False
Worksheets("Sheet1").Protect
End Sub

Thanks
TK



Paul B

Application.DisplayAlerts
 
TK, you cannot enter data into a proctected cell, locked cell,

By default all cells in excel are protected or locked, select the cells you
want to unlock and go to format, cells, protection and uncheck locked, the
go to tools, protection, and protect sheet, enter a password if you want,
now only the cells that you unlocked can be edited.

If you only need a few locked I would select them all first, Ctrl A, then
go to format, cells, protection and uncheck locked, then select the cells
you want to lock and go to format cells and check locked, the go to tools,
protection, and protect sheet, enter a password if you want, now the cells
that you locked can not be edited


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TK" wrote in message
...
Hi:

The following does not stop the alert message box if
an attempt is made to enter data into a protected cell.
Any advice as to how to stop the alerts would be greatly
appreciated.

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Unprotect
Application.DisplayAlerts = False
Worksheets("Sheet1").Protect
End Sub

Thanks
TK





TK

Application.DisplayAlerts
 
Thanks Paul:

I probably was not clear. Im familiar with the sheet
protecting procedure. Im trying to stop the caution
alert if a user tries to inadvertently enter data into a
protected cell. Obviously, they cannot enter data I just
do not want them to be reminded that they cannot.

Thanks
TK




"Paul B" wrote:

TK, you cannot enter data into a proctected cell, locked cell,

By default all cells in excel are protected or locked, select the cells you
want to unlock and go to format, cells, protection and uncheck locked, the
go to tools, protection, and protect sheet, enter a password if you want,
now only the cells that you unlocked can be edited.

If you only need a few locked I would select them all first, Ctrl A, then
go to format, cells, protection and uncheck locked, then select the cells
you want to lock and go to format cells and check locked, the go to tools,
protection, and protect sheet, enter a password if you want, now the cells
that you locked can not be edited


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TK" wrote in message
...
Hi:

The following does not stop the alert message box if
an attempt is made to enter data into a protected cell.
Any advice as to how to stop the alerts would be greatly
appreciated.

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Unprotect
Application.DisplayAlerts = False
Worksheets("Sheet1").Protect
End Sub

Thanks
TK






Paul B

Application.DisplayAlerts
 
TK, I don't think you can cut off that alert, how about not letting them
select the locked cells? If you are using excel 2002 or newer when you
protect the sheet uncheck select locked cells, if you have an early version
you can use a macro like this in the thisworkbook module

Private Sub Workbook_Open()
'will not let you select locked cells
'This is a setting that excel doesn't remember between closings,so have
'your workbook_open code do it each time:
With Worksheets("sheet1") 'change to your sheet name
..Activate
..EnableSelection = xlUnlockedCells

'change password here
..Protect Password:="123", Contents:=True, UserInterfaceOnly:=True
End With
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TK" wrote in message
...
Thanks Paul:

I probably was not clear. I'm familiar with the sheet
protecting procedure. I'm trying to stop the caution
alert if a user tries to inadvertently enter data into a
protected cell. Obviously, they cannot enter data I just
do not want them to be reminded that they cannot.

Thanks
TK




"Paul B" wrote:

TK, you cannot enter data into a proctected cell, locked cell,

By default all cells in excel are protected or locked, select the cells
you
want to unlock and go to format, cells, protection and uncheck locked,
the
go to tools, protection, and protect sheet, enter a password if you want,
now only the cells that you unlocked can be edited.

If you only need a few locked I would select them all first, Ctrl A,
then
go to format, cells, protection and uncheck locked, then select the cells
you want to lock and go to format cells and check locked, the go to
tools,
protection, and protect sheet, enter a password if you want, now the
cells
that you locked can not be edited


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TK" wrote in message
...
Hi:

The following does not stop the alert message box if
an attempt is made to enter data into a protected cell.
Any advice as to how to stop the alerts would be greatly
appreciated.

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Unprotect
Application.DisplayAlerts = False
Worksheets("Sheet1").Protect
End Sub

Thanks
TK








TK

Application.DisplayAlerts
 
Thanks Paul:

I guess your right. My confusion came from the fact
that I was able to set displayAlerts = False when
changing pages using a macro. This I found you can do
via (Microsoft Library). Not so with the page selector.
I got that idea from post :
€śStop Message To Unprotect€ť 11/11/2004

Good Luck
TK


"Paul B" wrote:

TK, I don't think you can cut off that alert, how about not letting them
select the locked cells? If you are using excel 2002 or newer when you
protect the sheet uncheck select locked cells, if you have an early version
you can use a macro like this in the thisworkbook module

Private Sub Workbook_Open()
'will not let you select locked cells
'This is a setting that excel doesn't remember between closings,so have
'your workbook_open code do it each time:
With Worksheets("sheet1") 'change to your sheet name
..Activate
..EnableSelection = xlUnlockedCells

'change password here
..Protect Password:="123", Contents:=True, UserInterfaceOnly:=True
End With
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TK" wrote in message
...
Thanks Paul:

I probably was not clear. I'm familiar with the sheet
protecting procedure. I'm trying to stop the caution
alert if a user tries to inadvertently enter data into a
protected cell. Obviously, they cannot enter data I just
do not want them to be reminded that they cannot.

Thanks
TK




"Paul B" wrote:

TK, you cannot enter data into a proctected cell, locked cell,

By default all cells in excel are protected or locked, select the cells
you
want to unlock and go to format, cells, protection and uncheck locked,
the
go to tools, protection, and protect sheet, enter a password if you want,
now only the cells that you unlocked can be edited.

If you only need a few locked I would select them all first, Ctrl A,
then
go to format, cells, protection and uncheck locked, then select the cells
you want to lock and go to format cells and check locked, the go to
tools,
protection, and protect sheet, enter a password if you want, now the
cells
that you locked can not be edited


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"TK" wrote in message
...
Hi:

The following does not stop the alert message box if
an attempt is made to enter data into a protected cell.
Any advice as to how to stop the alerts would be greatly
appreciated.

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Unprotect
Application.DisplayAlerts = False
Worksheets("Sheet1").Protect
End Sub

Thanks
TK










All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com