Workbook Security Help

jsambrook

Board Regular
Joined
Feb 1, 2010
Messages
214
I'm trying to use a macro to copy a 2 rows that I want hidden. The macro unhides these rows, copies them and then hides them again. It worked ok until I tried to protect the worksheet. I've tried unlocking these rows, and and the surrounding rows. But it always crashes as the macro is trying to unhide the rows. Anyone know a work around?
thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Maybe like this

Code:
ActiveSheet.Unprotect Password:="abc"
'
'your code
'
ActiveSheet.Protect Password:="abc"
 
Upvote 0
Thanks, will give it a go.

Only reason I unhid it was because when it pasted the cells elsewhere, they were also hidden!

thanks for your help
Janni
 
Upvote 0
Thanks, will give it a go.

Only reason I unhid it was because when it pasted the cells elsewhere, they were also hidden!

thanks for your help
Janni

You can unhide it at the paste destination.

You have to unhide it one way or the other right?
Might as well do it at the destination to avoid having to unprotect/reprotect the source sheet.
 
Upvote 0
I thought that it would be easier to hide the one I was copying as it will always be in the same place. I'm not too fluent at writing script and wasnt sure how to locate the new row I had pasted.
 
Upvote 0
Just curious... When you say 'copy,' are you looking just to take the values in the cells somewhere else, or do you need the cells' formatting, forumulas, etc to go along for the trip?
 
Upvote 0
Two rows are copied that have formulas linking to one of the cells in that row, and also some other cells in the spreadsheet. It also has an input box that changes one cell in these rows that gives the rows a new meaning.
 
Upvote 0
I have a slight issue with a hyperlink and my secured cells. I want the hyperlink to be clicked but not to edit the contents of the cell. For some reason it works on one tab and not on the other. I cant see any difference in the formatting or anything else. I initially wanted it set up so that you couldn't even click on locked cells, but the hyperlink seems to work on one sheet with click on locked cells. However, this doesn't work for all tabs! removing protection, the hyperlink does work!
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,700
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top