View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bloomberg Bloomberg is offline
external usenet poster
 
Posts: 5
Default Locking panes in macro

Try:
ActiveWindow.FreezePanes = False
It unlocks any locked cells. Just dont add any selection and it will work.

"TVA" skrev:

Me again.. I just want to add that it is not the same cells, rows that locked
every time. The macro searches the spreadsheet for certain cells and then
lock cells depending on where certain cells are found. Thus I would like to
unlock all cells at the beginning of the macro if possible. Or any other way
of solving it is fine..Thanks!

"JP" skrev:

I have a macro that does certain things. Among these things I want the macrp
to olck panes. I know how to do this. The problem is that I run the same
macro several times on the same spreadsheet. Thus if the panes are already
locked when I run the macro the program does not work. I then have trued to
unlocking the panes at the beginning of the macro but then I get the same
problem, if panes are not locked when running the macro it does not work. Is
there any way to solve this e.g. some boolean check to see if panes inn fact
are locked or something? i am not ver good at programming so any help is
appreciated! Thanks!