Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Code to prevent Remove Split or Unfreeze Panes?

I asked this question a couple of days ago, but no one left a solution,
or suggestion that will work.

Can anyone post code that will disable: 'Remove Split' and 'Unfreeze
Panes', on individual sheets or every sheet in a workbook?

....I understand that if I check the Protect workbood for: 'Windows' box
in the Protect Workbook dialog box, this will disable 'Remove Split' and
'Unfreeze Panes'.

However, when the above option is checked, it causes each sheet window
in the workbook to seperate from the main Excel Program window, into the
'multiple document interface' (MDI) style of displaying windows. Then
each sheet window will be smallaer that the program main window, with no
control buttons in the upper right to expand the window, and each sheet
will display a title bar. I don't want that. I would like to display
each sheet maxamized to the full program window, and have the user not
be permitted to Remove Split, or Unfreeze Panes.

Can this be done?

Thanks.

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Code to prevent Remove Split or Unfreeze Panes?

You could undo the removal: Copy the code below, right-click the sheet tab, select "View Code", and
paste the code into the window that appears. It will re-freeze the window at cell C3.... It might
be a bit unsettling to your users (personally, I would remove code like this), but it will work.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True

End Sub



"dk_" wrote in message
...
I asked this question a couple of days ago, but no one left a solution,
or suggestion that will work.

Can anyone post code that will disable: 'Remove Split' and 'Unfreeze
Panes', on individual sheets or every sheet in a workbook?

...I understand that if I check the Protect workbood for: 'Windows' box
in the Protect Workbook dialog box, this will disable 'Remove Split' and
'Unfreeze Panes'.

However, when the above option is checked, it causes each sheet window
in the workbook to seperate from the main Excel Program window, into the
'multiple document interface' (MDI) style of displaying windows. Then
each sheet window will be smallaer that the program main window, with no
control buttons in the upper right to expand the window, and each sheet
will display a title bar. I don't want that. I would like to display
each sheet maxamized to the full program window, and have the user not
be permitted to Remove Split, or Unfreeze Panes.

Can this be done?

Thanks.

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture



  #3   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Code to prevent Remove Split or Unfreeze Panes?

In article ,
"Bernie Deitrick" <deitbe @ consumer dot org wrote:

You could undo the removal: Copy the code below, right-click the
sheet tab, select "View Code", and paste the code into the window
that appears. It will re-freeze the window at cell C3.... It might
be a bit unsettling to your users (personally, I would remove code
like this), but it will work.



HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True

End Sub


-----------------
Bernie,

That is cute! ;) Any more like that?

How would I use your code for a workbook with 12 sheets?

.....can the code be fixed to be global for the workbook (all sheets), or
do I need to paste the code into each individual worksheet?

Besides surprising the user, is there any downside to implementing this
tactic?

Thanks again. That is an unsettling event for the user, but most
effective! :)

-Dennis

---------------------------------



"dk_" wrote in message
...
I asked this question a couple of days ago, but no one left a solution,
or suggestion that will work.

Can anyone post code that will disable: 'Remove Split' and 'Unfreeze
Panes', on individual sheets or every sheet in a workbook?

...I understand that if I check the Protect workbood for: 'Windows' box
in the Protect Workbook dialog box, this will disable 'Remove Split' and
'Unfreeze Panes'.

However, when the above option is checked, it causes each sheet window
in the workbook to seperate from the main Excel Program window, into the
'multiple document interface' (MDI) style of displaying windows. Then
each sheet window will be smallaer that the program main window, with no
control buttons in the upper right to expand the window, and each sheet
will display a title bar. I don't want that. I would like to display
each sheet maxamized to the full program window, and have the user not
be permitted to Remove Split, or Unfreeze Panes.

Can this be done?

Thanks.

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture






--
Dennis Kessler
http://www.denniskessler.com/acupuncture
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Code to prevent Remove Split or Unfreeze Panes?

Dennis,

If you want the same split on each sheet, then you could simply use the
workbook's worksheet change event: in the codemodule of the Thisworkbook
object, paste this code:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True
End Sub

If you wanted different splits dependent of the worksheet, then you would
need to have some decision code, like:

Range("A1").Select
Range("C3").Select

If Sh.Name = "Sheet1" then
Range("A1").Select
Range("E4").Select
ElseIf......


HTH,
Bernie
MS Excel MVP





"dk_" wrote in message
...
In article ,
"Bernie Deitrick" <deitbe @ consumer dot org wrote:

You could undo the removal: Copy the code below, right-click the
sheet tab, select "View Code", and paste the code into the window
that appears. It will re-freeze the window at cell C3.... It might
be a bit unsettling to your users (personally, I would remove code
like this), but it will work.



HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True

End Sub


-----------------
Bernie,

That is cute! ;) Any more like that?

How would I use your code for a workbook with 12 sheets?

....can the code be fixed to be global for the workbook (all sheets), or
do I need to paste the code into each individual worksheet?

Besides surprising the user, is there any downside to implementing this
tactic?

Thanks again. That is an unsettling event for the user, but most
effective! :)

-Dennis

---------------------------------



"dk_" wrote in message
...
I asked this question a couple of days ago, but no one left a solution,
or suggestion that will work.

Can anyone post code that will disable: 'Remove Split' and 'Unfreeze
Panes', on individual sheets or every sheet in a workbook?

...I understand that if I check the Protect workbood for: 'Windows' box
in the Protect Workbook dialog box, this will disable 'Remove Split'
and
'Unfreeze Panes'.

However, when the above option is checked, it causes each sheet window
in the workbook to seperate from the main Excel Program window, into
the
'multiple document interface' (MDI) style of displaying windows. Then
each sheet window will be smallaer that the program main window, with
no
control buttons in the upper right to expand the window, and each sheet
will display a title bar. I don't want that. I would like to display
each sheet maxamized to the full program window, and have the user not
be permitted to Remove Split, or Unfreeze Panes.

Can this be done?

Thanks.

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture






--
Dennis Kessler
http://www.denniskessler.com/acupuncture



  #5   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Code to prevent Remove Split or Unfreeze Panes?

In article ,
"Bernie Deitrick" <deitbe @ consumer dot org wrote:

Dennis,

If you want the same split on each sheet, then you could simply use the
workbook's worksheet change event: in the codemodule of the Thisworkbook
object, paste this code:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True
End Sub

If you wanted different splits dependent of the worksheet, then you would
need to have some decision code, like:

Range("A1").Select
Range("C3").Select

If Sh.Name = "Sheet1" then
Range("A1").Select
Range("E4").Select
ElseIf......


HTH,
Bernie
MS Excel MVP


Bernie,

Thank you.

A question regarding customizing your code above...

I have 10 sheets with identical layouts, named 'system1, system2, etc.',
and 2 sheets each with other names and different freeze layouts. Would
you show me how to do the: [If Sh.Name = "Sheet1" then] statement for
this situation? ...This code is very new to me, but amazing and fun.

Is there a performance downside to using this code? Or, is it negligible?

Does this code break anything else that I should be aware of?

-Dennis

------------------------------------



"dk_" wrote in message
...
In article ,
"Bernie Deitrick" <deitbe @ consumer dot org wrote:

You could undo the removal: Copy the code below, right-click the
sheet tab, select "View Code", and paste the code into the window
that appears. It will re-freeze the window at cell C3.... It might
be a bit unsettling to your users (personally, I would remove code
like this), but it will work.



HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True

End Sub


-----------------
Bernie,

That is cute! ;) Any more like that?

How would I use your code for a workbook with 12 sheets?

....can the code be fixed to be global for the workbook (all sheets), or
do I need to paste the code into each individual worksheet?

Besides surprising the user, is there any downside to implementing this
tactic?

Thanks again. That is an unsettling event for the user, but most
effective! :)

-Dennis

---------------------------------



"dk_" wrote in message
...
I asked this question a couple of days ago, but no one left a solution,
or suggestion that will work.

Can anyone post code that will disable: 'Remove Split' and 'Unfreeze
Panes', on individual sheets or every sheet in a workbook?

...I understand that if I check the Protect workbood for: 'Windows' box
in the Protect Workbook dialog box, this will disable 'Remove Split'
and
'Unfreeze Panes'.

However, when the above option is checked, it causes each sheet window
in the workbook to seperate from the main Excel Program window, into
the
'multiple document interface' (MDI) style of displaying windows. Then
each sheet window will be smallaer that the program main window, with
no
control buttons in the upper right to expand the window, and each sheet
will display a title bar. I don't want that. I would like to display
each sheet maxamized to the full program window, and have the user not
be permitted to Remove Split, or Unfreeze Panes.

Can this be done?

Thanks.

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Code to prevent Remove Split or Unfreeze Panes?

Dennis,

Something like this should work:

If Sh.Name Like "System*" then
Range("A1").Select
Range("E4").Select
ElseIf Sh.Name = "Other Name" then
Range("A1").Select
Range("H5").Select
ElseIf Sh.Name = "Last Name" then
Range("A1").Select
Range("G9").Select
End if

ActiveWindow.FreezePanes = True
Application.Goto myR, Scroll:=True

There really shouldn't be a noticeable performance cost, since the user will
be selecting cells, not doing heavy calculations, when this code is run.

HTH,
Bernie
MS Excel MVP


Bernie,

Thank you.

A question regarding customizing your code above...

I have 10 sheets with identical layouts, named 'system1, system2, etc.',
and 2 sheets each with other names and different freeze layouts. Would
you show me how to do the: [If Sh.Name = "Sheet1" then] statement for
this situation? ...This code is very new to me, but amazing and fun.

Is there a performance downside to using this code? Or, is it negligible?

Does this code break anything else that I should be aware of?

-Dennis

------------------------------------



"dk_" wrote in message
...
In article ,
"Bernie Deitrick" <deitbe @ consumer dot org wrote:

You could undo the removal: Copy the code below, right-click the
sheet tab, select "View Code", and paste the code into the window
that appears. It will re-freeze the window at cell C3.... It might
be a bit unsettling to your users (personally, I would remove code
like this), but it will work.


HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True

End Sub

-----------------
Bernie,

That is cute! ;) Any more like that?

How would I use your code for a workbook with 12 sheets?

....can the code be fixed to be global for the workbook (all sheets),
or
do I need to paste the code into each individual worksheet?

Besides surprising the user, is there any downside to implementing this
tactic?

Thanks again. That is an unsettling event for the user, but most
effective! :)

-Dennis

---------------------------------



"dk_" wrote in message
...
I asked this question a couple of days ago, but no one left a
solution,
or suggestion that will work.

Can anyone post code that will disable: 'Remove Split' and 'Unfreeze
Panes', on individual sheets or every sheet in a workbook?

...I understand that if I check the Protect workbood for: 'Windows'
box
in the Protect Workbook dialog box, this will disable 'Remove Split'
and
'Unfreeze Panes'.

However, when the above option is checked, it causes each sheet
window
in the workbook to seperate from the main Excel Program window, into
the
'multiple document interface' (MDI) style of displaying windows.
Then
each sheet window will be smallaer that the program main window,
with
no
control buttons in the upper right to expand the window, and each
sheet
will display a title bar. I don't want that. I would like to display
each sheet maxamized to the full program window, and have the user
not
be permitted to Remove Split, or Unfreeze Panes.

Can this be done?

Thanks.

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture



  #7   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Code to prevent Remove Split or Unfreeze Panes?

Bernie,

Thank you once again.

I have been playing with the code and it definately works, but I can't
figure out exactly what each bit of code is doing.

When I change one or both of the ranges, or even if I don't change the
range, apparently depending on which cell is selected, I get a different
display redraws. I mean that the page will scroll to different locations.

Would your mind explaining each line of code?

For example, Range().select is repeated, what is the difference between
the first Range and the second? What if I leave one out? What do the
other lines of code do?

I'd like to learn by taking your code apart and playing with it.

Thanks.

-Dennis


--
Dennis Kessler
http://www.denniskessler.com/acupuncture

---------------------
In article ,
"Bernie Deitrick" <deitbe @ consumer dot org wrote:

Dennis,

Something like this should work:

If Sh.Name Like "System*" then
Range("A1").Select
Range("E4").Select
ElseIf Sh.Name = "Other Name" then
Range("A1").Select
Range("H5").Select
ElseIf Sh.Name = "Last Name" then
Range("A1").Select
Range("G9").Select
End if

ActiveWindow.FreezePanes = True
Application.Goto myR, Scroll:=True

There really shouldn't be a noticeable performance cost, since the user will
be selecting cells, not doing heavy calculations, when this code is run.

HTH,
Bernie
MS Excel MVP


Bernie,

Thank you.

A question regarding customizing your code above...

I have 10 sheets with identical layouts, named 'system1, system2, etc.',
and 2 sheets each with other names and different freeze layouts. Would
you show me how to do the: [If Sh.Name = "Sheet1" then] statement for
this situation? ...This code is very new to me, but amazing and fun.

Is there a performance downside to using this code? Or, is it negligible?

Does this code break anything else that I should be aware of?

-Dennis

------------------------------------



"dk_" wrote in message
...
In article ,
"Bernie Deitrick" <deitbe @ consumer dot org wrote:

You could undo the removal: Copy the code below, right-click the
sheet tab, select "View Code", and paste the code into the window
that appears. It will re-freeze the window at cell C3.... It might
be a bit unsettling to your users (personally, I would remove code
like this), but it will work.


HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myR As Range
If ActiveWindow.FreezePanes Then Exit Sub
' Or use
' If ActiveWindow.Split Then Exit Sub
Application.EnableEvents = False
Set myR = Selection
Range("A1").Select
Range("C3").Select
ActiveWindow.FreezePanes = True
'ActiveWindow.Split = True
Application.Goto myR, Scroll:=True
Application.EnableEvents = True

End Sub

-----------------
Bernie,

That is cute! ;) Any more like that?

How would I use your code for a workbook with 12 sheets?

....can the code be fixed to be global for the workbook (all sheets),
or do I need to paste the code into each individual worksheet?

Besides surprising the user, is there any downside to implementing this
tactic?

Thanks again. That is an unsettling event for the user, but most
effective! :)

-Dennis

---------------------------------



"dk_" wrote in message
...
I asked this question a couple of days ago, but no one left a
solution,
or suggestion that will work.

Can anyone post code that will disable: 'Remove Split' and 'Unfreeze
Panes', on individual sheets or every sheet in a workbook?

...I understand that if I check the Protect workbood for: 'Windows'
box
in the Protect Workbook dialog box, this will disable 'Remove Split'
and
'Unfreeze Panes'.

However, when the above option is checked, it causes each sheet
window
in the workbook to seperate from the main Excel Program window, into
the
'multiple document interface' (MDI) style of displaying windows.
Then
each sheet window will be smallaer that the program main window,
with
no
control buttons in the upper right to expand the window, and each
sheet
will display a title bar. I don't want that. I would like to display
each sheet maxamized to the full program window, and have the user
not
be permitted to Remove Split, or Unfreeze Panes.

Can this be done?

Thanks.

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture



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
Disable Unfreeze Panes and Remove Split, how? dk_ Excel Discussion (Misc queries) 2 October 4th 06 10:57 PM
2 Questions John Calder New Users to Excel 18 August 24th 06 04:17 AM
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
How do I Remove a Split from my Comments in Excel 2003? JesusPresley Excel Discussion (Misc queries) 1 October 6th 05 07:59 PM
How do I Remove a Split from my Comments in Excel 2003? JesusPresley Excel Discussion (Misc queries) 0 October 6th 05 06:54 PM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"