Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Running Macros in a protected workbook
Hi,
I have just started to use macros in Excel worksheets at a basic level, I am recording the macro using "key strokes" rather than righting the code. (This I have yet to master) My problem is that I have a workbook containing several sheets which contain columns of data that I want to lock. However when the sheets are locked and the macro run it generates errors. I have read through articles on unprotecting the sheet but when I try to write these codes into VBA the macro still doesn't work. Can anyone give me a simple idiots guide answer Many thanks Rob |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Running Macros in a protected workbook
Hi Rob
First unprotect the sheet, then your code to manipulate the sheet. Finally, protect the sheet again. Worksheets("YourSheet").UnProtect Password:="JustMe" and Worksheets("YourSheet").Protect Password:="JustMe" Hopes this helps. .... Per "Christian" skrev i meddelelsen ... Hi, I have just started to use macros in Excel worksheets at a basic level, I am recording the macro using "key strokes" rather than righting the code. (This I have yet to master) My problem is that I have a workbook containing several sheets which contain columns of data that I want to lock. However when the sheets are locked and the macro run it generates errors. I have read through articles on unprotecting the sheet but when I try to write these codes into VBA the macro still doesn't work. Can anyone give me a simple idiots guide answer Many thanks Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running VB macros | New Users to Excel | |||
Running Macros | Links and Linking in Excel | |||
Running Macros | Excel Discussion (Misc queries) | |||
Running Macros when on the LAN | Excel Discussion (Misc queries) | |||
Running Macros in protected workbook | Excel Worksheet Functions |