![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 2
|
I have a small problem with an Excel macro. I am trying to unprotect a sheet using the following code....
sheet1.select sheet1.unprotect should be simple, but this causes an error. If I select a cell on the sheet explicitly then it works okay ie if I use sheet1.cells(1,1).select sheet1.unprotect does anybody know why????? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
I am using excel2000 and your code worked for me.
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi
If you are running your code from a command button, set it's TakeFocus******* Property to false. Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|