Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JP JP is offline
external usenet poster
 
Posts: 103
Default Locking panes in macro

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
TVA TVA is offline
external usenet poster
 
Posts: 1
Default Locking panes in macro

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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
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!

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
more macro help - freeze panes mastersparky Excel Discussion (Misc queries) 4 September 28th 08 04:11 AM
Macro for removing columns/rows, freezing panes etc? [email protected] New Users to Excel 1 April 3rd 08 12:36 PM
More Dividers for Excel Viewing Panes / multiple panes per axis. bIgJeNkS3 Excel Discussion (Misc queries) 1 August 2nd 06 11:51 PM
Locking panes Nick London Excel Programming 1 July 4th 06 12:48 PM
Panes sequence. Pane Index 2 & 3 depend on how panes are created keepITcool Excel Programming 0 August 17th 05 12:18 PM


All times are GMT +1. The time now is 06:15 PM.

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"