Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default unhide, Remove filter, Unfreeze help

I usually get a lot of files to work with and most of the time there can be
hidden sheets, freezed panes, split and filtered values.

Is there a way to run a macro and make sure that all my sheets in the folder
have been cleared of these functions before I can proceed.
will appreciate all help. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default unhide, Remove filter, Unfreeze help

try following (not tested)

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Visible = True
If .FilterMode = True Then FilterMode = False
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub
--
jb


"Yossy" wrote:

I usually get a lot of files to work with and most of the time there can be
hidden sheets, freezed panes, split and filtered values.

Is there a way to run a macro and make sure that all my sheets in the folder
have been cleared of these functions before I can proceed.
will appreciate all help. Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default unhide, Remove filter, Unfreeze help

Thanks John,
It does remove the freeze and splits if any but does not work for the filter
and hidden rows.


"john" wrote:

try following (not tested)

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Visible = True
If .FilterMode = True Then FilterMode = False
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub
--
jb


"Yossy" wrote:

I usually get a lot of files to work with and most of the time there can be
hidden sheets, freezed panes, split and filtered values.

Is there a way to run a macro and make sure that all my sheets in the folder
have been cleared of these functions before I can proceed.
will appreciate all help. Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default unhide, Remove filter, Unfreeze help

try updated version:

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Unprotect Password:="mypassword" '<< change as required
.Visible = True
If .FilterMode = True Then .ShowAllData
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub

I have added a line to unprotect sheet delete if not needed otherwise add
correct password.
--
jb


"Yossy" wrote:

Thanks John,
It does remove the freeze and splits if any but does not work for the filter
and hidden rows.


"john" wrote:

try following (not tested)

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Visible = True
If .FilterMode = True Then FilterMode = False
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub
--
jb


"Yossy" wrote:

I usually get a lot of files to work with and most of the time there can be
hidden sheets, freezed panes, split and filtered values.

Is there a way to run a macro and make sure that all my sheets in the folder
have been cleared of these functions before I can proceed.
will appreciate all help. Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default unhide, Remove filter, Unfreeze help

Perfect, works great. Is there a way to incorporate Format cell in this. That
is to clear wrap text,shrink to fit and merge cell.

Sorry for asking too much. I will really appreciate all help. Please note i
do get hundreds of sheets with multple tabs in each sheet. Just want to run
macro so that it will affect all sheets and tabs in a folder.

"john" wrote:

try updated version:

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Unprotect Password:="mypassword" '<< change as required
.Visible = True
If .FilterMode = True Then .ShowAllData
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub

I have added a line to unprotect sheet delete if not needed otherwise add
correct password.
--
jb


"Yossy" wrote:

Thanks John,
It does remove the freeze and splits if any but does not work for the filter
and hidden rows.


"john" wrote:

try following (not tested)

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Visible = True
If .FilterMode = True Then FilterMode = False
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub
--
jb


"Yossy" wrote:

I usually get a lot of files to work with and most of the time there can be
hidden sheets, freezed panes, split and filtered values.

Is there a way to run a macro and make sure that all my sheets in the folder
have been cleared of these functions before I can proceed.
will appreciate all help. Thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default unhide, Remove filter, Unfreeze help

yes is the short answer but depending on number of sheets may prove to be
rather slow. I am required elsewhere at moment if i get an opportunity will
have think about your request unless another person kindly responds.

--
jb


"Yossy" wrote:

Perfect, works great. Is there a way to incorporate Format cell in this. That
is to clear wrap text,shrink to fit and merge cell.

Sorry for asking too much. I will really appreciate all help. Please note i
do get hundreds of sheets with multple tabs in each sheet. Just want to run
macro so that it will affect all sheets and tabs in a folder.

"john" wrote:

try updated version:

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Unprotect Password:="mypassword" '<< change as required
.Visible = True
If .FilterMode = True Then .ShowAllData
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub

I have added a line to unprotect sheet delete if not needed otherwise add
correct password.
--
jb


"Yossy" wrote:

Thanks John,
It does remove the freeze and splits if any but does not work for the filter
and hidden rows.


"john" wrote:

try following (not tested)

Sub clearsettings()
Application.ScreenUpdating = False
For Each sh In ActiveWorkbook.Sheets
With sh
.Activate
.Visible = True
If .FilterMode = True Then FilterMode = False
End With
With ActiveWindow
.FreezePanes = False
.Split = False
End With
Next sh
Application.ScreenUpdating = True
End Sub
--
jb


"Yossy" wrote:

I usually get a lot of files to work with and most of the time there can be
hidden sheets, freezed panes, split and filtered values.

Is there a way to run a macro and make sure that all my sheets in the folder
have been cleared of these functions before I can proceed.
will appreciate all help. 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
How do I unfreeze columns Steve Excel Discussion (Misc queries) 2 May 17th 07 08:00 PM
Program/Macro to remove Hide/Unhide with password? ssciarrino Excel Programming 0 May 4th 07 05:36 PM
Code to prevent Remove Split or Unfreeze Panes? dk_ Excel Discussion (Misc queries) 6 October 9th 06 08:35 PM
Disable Unfreeze Panes and Remove Split, how? dk_ Excel Discussion (Misc queries) 2 October 4th 06 10:57 PM
Using Hide, Unhide, and auto filter - select all on a protected sh Pattie Excel Worksheet Functions 1 July 7th 06 04:47 PM


All times are GMT +1. The time now is 01:52 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"