#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Sheet Protection

I wrote a Micro to change something is DataValidation window with a shortcut
key ctrl-F. When I protect the sheet I am unable to use that micro.
I even tried allowing all the functions that are listed in protection window
and still nothing.

Is there a way to get pass that? Or is DataValidation just LOCKED when you
protect the sheet.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sheet Protection

A lot of functions cannot be changed on a protected sheet.

Usually you provide code to unprotect, do what you want then re-protect.

ActiveSheet.Unprotect Password:="justme"
do things
ActiveSheet.Protect Password:="justme"

Post the macro code that you wrote to change something in DataValidation.


Gord Dibben MS Excel MVP

On Tue, 4 Aug 2009 07:50:02 -0700, Damian
wrote:

I wrote a Micro to change something is DataValidation window with a shortcut
key ctrl-F. When I protect the sheet I am unable to use that micro.
I even tried allowing all the functions that are listed in protection window
and still nothing.

Is there a way to get pass that? Or is DataValidation just LOCKED when you
protect the sheet.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Sheet Protection

OK here is my Code:

Sub CustomCell()
'
' CustomCell Macro
' Macro recorded 8/4/2009 by IT Department
'
' Keyboard Shortcut: Ctrl+f
'
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub

Basically it clears the drop down cell so custom data can be entered rather
then picked from drop down menu.

So when I put your command in it will work?
Thanks

"Gord Dibben" wrote:

A lot of functions cannot be changed on a protected sheet.

Usually you provide code to unprotect, do what you want then re-protect.

ActiveSheet.Unprotect Password:="justme"
do things
ActiveSheet.Protect Password:="justme"

Post the macro code that you wrote to change something in DataValidation.


Gord Dibben MS Excel MVP

On Tue, 4 Aug 2009 07:50:02 -0700, Damian
wrote:

I wrote a Micro to change something is DataValidation window with a shortcut
key ctrl-F. When I protect the sheet I am unable to use that micro.
I even tried allowing all the functions that are listed in protection window
and still nothing.

Is there a way to get pass that? Or is DataValidation just LOCKED when you
protect the sheet.

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sheet Protection

Sub CustomCell()
'
' CustomCell Macro
' Macro recorded 8/4/2009 by IT Department
'
' Keyboard Shortcut: Ctrl+f

'
ActiveSheet.Unprotect Password:="justme"
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, _
AlertStyle:=xlValidAlertStop, Operator _
:=xlBetween
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
With ActiveSheet
.Protect Password:="justme"
.EnableSelection = xlNoRestrictions
End With
End Sub


Gord


On Tue, 4 Aug 2009 09:01:01 -0700, Damian
wrote:

OK here is my Code:

Sub CustomCell()
'
' CustomCell Macro
' Macro recorded 8/4/2009 by IT Department
'
' Keyboard Shortcut: Ctrl+f
'
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub

Basically it clears the drop down cell so custom data can be entered rather
then picked from drop down menu.

So when I put your command in it will work?
Thanks

"Gord Dibben" wrote:

A lot of functions cannot be changed on a protected sheet.

Usually you provide code to unprotect, do what you want then re-protect.

ActiveSheet.Unprotect Password:="justme"
do things
ActiveSheet.Protect Password:="justme"

Post the macro code that you wrote to change something in DataValidation.


Gord Dibben MS Excel MVP

On Tue, 4 Aug 2009 07:50:02 -0700, Damian
wrote:

I wrote a Micro to change something is DataValidation window with a shortcut
key ctrl-F. When I protect the sheet I am unable to use that micro.
I even tried allowing all the functions that are listed in protection window
and still nothing.

Is there a way to get pass that? Or is DataValidation just LOCKED when you
protect the sheet.

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Sheet Protection

Works Like a charm. Thank you.

One last thing.
I want the user to only select unlocked cells and not locked cells.
How do I wright that for the restrictions?

In the Protect Sheet window under:
Allow all users of this worksheet to: (the only thing checked is:)
Select unlocked cells

Thank you in advance

"Gord Dibben" wrote:

Sub CustomCell()
'
' CustomCell Macro
' Macro recorded 8/4/2009 by IT Department
'
' Keyboard Shortcut: Ctrl+f

'
ActiveSheet.Unprotect Password:="justme"
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, _
AlertStyle:=xlValidAlertStop, Operator _
:=xlBetween
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
With ActiveSheet
.Protect Password:="justme"
.EnableSelection = xlNoRestrictions
End With
End Sub


Gord


On Tue, 4 Aug 2009 09:01:01 -0700, Damian
wrote:

OK here is my Code:

Sub CustomCell()
'
' CustomCell Macro
' Macro recorded 8/4/2009 by IT Department
'
' Keyboard Shortcut: Ctrl+f
'
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub

Basically it clears the drop down cell so custom data can be entered rather
then picked from drop down menu.

So when I put your command in it will work?
Thanks

"Gord Dibben" wrote:

A lot of functions cannot be changed on a protected sheet.

Usually you provide code to unprotect, do what you want then re-protect.

ActiveSheet.Unprotect Password:="justme"
do things
ActiveSheet.Protect Password:="justme"

Post the macro code that you wrote to change something in DataValidation.


Gord Dibben MS Excel MVP

On Tue, 4 Aug 2009 07:50:02 -0700, Damian
wrote:

I wrote a Micro to change something is DataValidation window with a shortcut
key ctrl-F. When I protect the sheet I am unable to use that micro.
I even tried allowing all the functions that are listed in protection window
and still nothing.

Is there a way to get pass that? Or is DataValidation just LOCKED when you
protect the sheet.

Thanks






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sheet Protection

Replace the other line with.............

..EnableSelection = xlUnlockedCells


Gord

On Tue, 4 Aug 2009 10:24:02 -0700, Damian
wrote:

Works Like a charm. Thank you.

One last thing.
I want the user to only select unlocked cells and not locked cells.
How do I wright that for the restrictions?

In the Protect Sheet window under:
Allow all users of this worksheet to: (the only thing checked is:)
Select unlocked cells

Thank you in advance

"Gord Dibben" wrote:

Sub CustomCell()
'
' CustomCell Macro
' Macro recorded 8/4/2009 by IT Department
'
' Keyboard Shortcut: Ctrl+f

'
ActiveSheet.Unprotect Password:="justme"
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, _
AlertStyle:=xlValidAlertStop, Operator _
:=xlBetween
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
With ActiveSheet
.Protect Password:="justme"
.EnableSelection = xlNoRestrictions
End With
End Sub


Gord


On Tue, 4 Aug 2009 09:01:01 -0700, Damian
wrote:

OK here is my Code:

Sub CustomCell()
'
' CustomCell Macro
' Macro recorded 8/4/2009 by IT Department
'
' Keyboard Shortcut: Ctrl+f
'
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = False
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub

Basically it clears the drop down cell so custom data can be entered rather
then picked from drop down menu.

So when I put your command in it will work?
Thanks

"Gord Dibben" wrote:

A lot of functions cannot be changed on a protected sheet.

Usually you provide code to unprotect, do what you want then re-protect.

ActiveSheet.Unprotect Password:="justme"
do things
ActiveSheet.Protect Password:="justme"

Post the macro code that you wrote to change something in DataValidation.


Gord Dibben MS Excel MVP

On Tue, 4 Aug 2009 07:50:02 -0700, Damian
wrote:

I wrote a Micro to change something is DataValidation window with a shortcut
key ctrl-F. When I protect the sheet I am unable to use that micro.
I even tried allowing all the functions that are listed in protection window
and still nothing.

Is there a way to get pass that? Or is DataValidation just LOCKED when you
protect the sheet.

Thanks





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sheet protection Smitty Excel Discussion (Misc queries) 7 January 11th 09 12:26 AM
Sheet protection Ridge Excel Discussion (Misc queries) 2 October 2nd 07 09:55 PM
sheet Protection Bwells Excel Discussion (Misc queries) 2 August 31st 07 06:44 PM
sheet protection jaci Excel Discussion (Misc queries) 1 August 31st 05 08:46 PM
Sheet Protection Corey Brock Excel Discussion (Misc queries) 1 January 12th 05 06:19 PM


All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"