Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel sheet protection

i have an excel sheet that contains a pivot table that i would like to
protect to avoid selecting locked cells but when i do so i can not refresh
the data of the pivot table!!!
What shall i do
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Excel sheet protection

you could create a macro like this that will uprotect then refresh then
protect sheet
without a password
Sub refresh()
ActiveSheet.Unprotect
ActiveWorkbook.RefreshAll
ActiveSheet.Protect
End Sub

"Yazan Barakat" wrote:

i have an excel sheet that contains a pivot table that i would like to
protect to avoid selecting locked cells but when i do so i can not refresh
the data of the pivot table!!!
What shall i do

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Excel sheet protection

This way you could use a password
Sub refreshwithpassword()
Application.ScreenUpdating = False
Sheet1.Unprotect "Password"
ActiveWorkbook.RefreshAll
Sheet1.Protect "Password"
Application.ScreenUpdating = True
End Sub


"Yazan Barakat" wrote:

i have an excel sheet that contains a pivot table that i would like to
protect to avoid selecting locked cells but when i do so i can not refresh
the data of the pivot table!!!
What shall i do

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel sheet protection

Thank you Mr. Mike the solution is partially valid, when i run the macro it
refreshs correctly but when it reprotects it changes the user allowable
options so he will not be able to filter the results.


"Mike" wrote:

you could create a macro like this that will uprotect then refresh then
protect sheet
without a password
Sub refresh()
ActiveSheet.Unprotect
ActiveWorkbook.RefreshAll
ActiveSheet.Protect
End Sub

"Yazan Barakat" wrote:

i have an excel sheet that contains a pivot table that i would like to
protect to avoid selecting locked cells but when i do so i can not refresh
the data of the pivot table!!!
What shall i do

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel sheet protection

gives run time error if a password already exists, if not it creats a new
password that i do not know

"Mike" wrote:

This way you could use a password
Sub refreshwithpassword()
Application.ScreenUpdating = False
Sheet1.Unprotect "Password"
ActiveWorkbook.RefreshAll
Sheet1.Protect "Password"
Application.ScreenUpdating = True
End Sub


"Yazan Barakat" wrote:

i have an excel sheet that contains a pivot table that i would like to
protect to avoid selecting locked cells but when i do so i can not refresh
the data of the pivot table!!!
What shall i do



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Excel sheet protection

Sheet1.Unprotect "Password"
Sheet1.Protect "Password" 'Password is the Password you can change to what you
want


"Yazan Barakat" wrote:

gives run time error if a password already exists, if not it creats a new
password that i do not know

"Mike" wrote:

This way you could use a password
Sub refreshwithpassword()
Application.ScreenUpdating = False
Sheet1.Unprotect "Password"
ActiveWorkbook.RefreshAll
Sheet1.Protect "Password"
Application.ScreenUpdating = True
End Sub


"Yazan Barakat" wrote:

i have an excel sheet that contains a pivot table that i would like to
protect to avoid selecting locked cells but when i do so i can not refresh
the data of the pivot table!!!
What shall i do

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
ON AN EXCEL SPREAD SHEET TOOLS/PROTECTION/ (4TABS are not enabled dan Excel Discussion (Misc queries) 3 January 8th 07 08:03 PM
in excel i want to make a sheet unprotected from the protection Imran Excel Discussion (Misc queries) 1 December 7th 06 04:54 PM
Excel Sheet Protection Beto Excel Discussion (Misc queries) 1 November 30th 05 11:29 PM
How do I remove the outline protection in Excel sheet? Rick Excel Discussion (Misc queries) 1 October 6th 05 07:43 PM
Sheet Protection & Grouped Columns in Excel Ruth Betts Excel Discussion (Misc queries) 2 April 29th 05 10:52 PM


All times are GMT +1. The time now is 04:50 AM.

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"