PC Review


Reply
Thread Tools Rate Thread

Disabling row and column headers option

 
 
=?Utf-8?B?Qm9i?=
Guest
Posts: n/a
 
      4th Sep 2007
Is there a way in VBA to disable the "Row and column headers" option within
the Tools | Options... | View tab menu so that a user cannot check (or
uncheck) the checkbox? I would like to do this without having to create a
custom toolbar or menu.

Thanks in advance for any guidance.

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      4th Sep 2007
I don't think you can change any of those built-in dialogs.

You can disable them, but you can't change them.

Bob wrote:
>
> Is there a way in VBA to disable the "Row and column headers" option within
> the Tools | Options... | View tab menu so that a user cannot check (or
> uncheck) the checkbox? I would like to do this without having to create a
> custom toolbar or menu.
>
> Thanks in advance for any guidance.


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?Qm9i?=
Guest
Posts: n/a
 
      4th Sep 2007
Dave,

What I want to do is click on the "Row and column headers" checkbox so that
the row and column headers are not displayed. Then I want to prevent users
from re-displaying the row and column headers (i.e., unchecking the checkbox).

Can you tell me how to disable the "Row and column headers" checkbox in VBA?

Thanks,
Bob


"Dave Peterson" wrote:

> I don't think you can change any of those built-in dialogs.
>
> You can disable them, but you can't change them.
>
> Bob wrote:
> >
> > Is there a way in VBA to disable the "Row and column headers" option within
> > the Tools | Options... | View tab menu so that a user cannot check (or
> > uncheck) the checkbox? I would like to do this without having to create a
> > custom toolbar or menu.
> >
> > Thanks in advance for any guidance.

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      4th Sep 2007
Nope. I can't.

You don't have that kind of granular control over the dialogs in excel.

In my USA version of Excel, I could use a line like this:

With Application.CommandBars("worksheet menu bar").Controls("Tools")
'.enabled or .visible????
.Controls("Options...").Enabled = False
End With

to try to prevent users from clicking on Tools|Options...

But if they reset the toolbar or disabled macros, then it would not work very
well!

Bob wrote:
>
> Dave,
>
> What I want to do is click on the "Row and column headers" checkbox so that
> the row and column headers are not displayed. Then I want to prevent users
> from re-displaying the row and column headers (i.e., unchecking the checkbox).
>
> Can you tell me how to disable the "Row and column headers" checkbox in VBA?
>
> Thanks,
> Bob
>
> "Dave Peterson" wrote:
>
> > I don't think you can change any of those built-in dialogs.
> >
> > You can disable them, but you can't change them.
> >
> > Bob wrote:
> > >
> > > Is there a way in VBA to disable the "Row and column headers" option within
> > > the Tools | Options... | View tab menu so that a user cannot check (or
> > > uncheck) the checkbox? I would like to do this without having to create a
> > > custom toolbar or menu.
> > >
> > > Thanks in advance for any guidance.

> >
> > --
> >
> > Dave Peterson
> >


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?Qm9i?=
Guest
Posts: n/a
 
      4th Sep 2007
Dave,
As a second option, I guess I could do something like:

Private Sub Worksheet_Activate()
ActiveWindow.DisplayHeadings = False
End Sub

Thanks again for all your help and advice.
Bob


"Dave Peterson" wrote:

> Nope. I can't.
>
> You don't have that kind of granular control over the dialogs in excel.
>
> In my USA version of Excel, I could use a line like this:
>
> With Application.CommandBars("worksheet menu bar").Controls("Tools")
> '.enabled or .visible????
> .Controls("Options...").Enabled = False
> End With
>
> to try to prevent users from clicking on Tools|Options...
>
> But if they reset the toolbar or disabled macros, then it would not work very
> well!
>
> Bob wrote:
> >
> > Dave,
> >
> > What I want to do is click on the "Row and column headers" checkbox so that
> > the row and column headers are not displayed. Then I want to prevent users
> > from re-displaying the row and column headers (i.e., unchecking the checkbox).
> >
> > Can you tell me how to disable the "Row and column headers" checkbox in VBA?
> >
> > Thanks,
> > Bob
> >
> > "Dave Peterson" wrote:
> >
> > > I don't think you can change any of those built-in dialogs.
> > >
> > > You can disable them, but you can't change them.
> > >
> > > Bob wrote:
> > > >
> > > > Is there a way in VBA to disable the "Row and column headers" option within
> > > > the Tools | Options... | View tab menu so that a user cannot check (or
> > > > uncheck) the checkbox? I would like to do this without having to create a
> > > > custom toolbar or menu.
> > > >
> > > > Thanks in advance for any guidance.
> > >
> > > --
> > >
> > > Dave Peterson
> > >

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      4th Sep 2007
You could use that, but the user could disable macros or events or just change
the option.



Bob wrote:
>
> Dave,
> As a second option, I guess I could do something like:
>
> Private Sub Worksheet_Activate()
> ActiveWindow.DisplayHeadings = False
> End Sub
>
> Thanks again for all your help and advice.
> Bob
>
> "Dave Peterson" wrote:
>
> > Nope. I can't.
> >
> > You don't have that kind of granular control over the dialogs in excel.
> >
> > In my USA version of Excel, I could use a line like this:
> >
> > With Application.CommandBars("worksheet menu bar").Controls("Tools")
> > '.enabled or .visible????
> > .Controls("Options...").Enabled = False
> > End With
> >
> > to try to prevent users from clicking on Tools|Options...
> >
> > But if they reset the toolbar or disabled macros, then it would not work very
> > well!
> >
> > Bob wrote:
> > >
> > > Dave,
> > >
> > > What I want to do is click on the "Row and column headers" checkbox so that
> > > the row and column headers are not displayed. Then I want to prevent users
> > > from re-displaying the row and column headers (i.e., unchecking the checkbox).
> > >
> > > Can you tell me how to disable the "Row and column headers" checkbox in VBA?
> > >
> > > Thanks,
> > > Bob
> > >
> > > "Dave Peterson" wrote:
> > >
> > > > I don't think you can change any of those built-in dialogs.
> > > >
> > > > You can disable them, but you can't change them.
> > > >
> > > > Bob wrote:
> > > > >
> > > > > Is there a way in VBA to disable the "Row and column headers" option within
> > > > > the Tools | Options... | View tab menu so that a user cannot check (or
> > > > > uncheck) the checkbox? I would like to do this without having to create a
> > > > > custom toolbar or menu.
> > > > >
> > > > > Thanks in advance for any guidance.
> > > >
> > > > --
> > > >
> > > > Dave Peterson
> > > >

> >
> > --
> >
> > Dave Peterson
> >


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      4th Sep 2007
It might be a bit of overkill, but if you did the DisplayHeadings = False and
then
deleted the Tools>Options from the menu, would it serve your purpose. Of
course, you would have to put it back at the end of the macro, because it
would otherwise carry over to any subsequent instance of Excel. But it would
make it difficult for a novice to restore the headings, since the check box
would be inaccessible untile the menu item was restored.

"Bob" wrote:

> Dave,
> As a second option, I guess I could do something like:
>
> Private Sub Worksheet_Activate()
> ActiveWindow.DisplayHeadings = False
> End Sub
>
> Thanks again for all your help and advice.
> Bob
>
>
> "Dave Peterson" wrote:
>
> > Nope. I can't.
> >
> > You don't have that kind of granular control over the dialogs in excel.
> >
> > In my USA version of Excel, I could use a line like this:
> >
> > With Application.CommandBars("worksheet menu bar").Controls("Tools")
> > '.enabled or .visible????
> > .Controls("Options...").Enabled = False
> > End With
> >
> > to try to prevent users from clicking on Tools|Options...
> >
> > But if they reset the toolbar or disabled macros, then it would not work very
> > well!
> >
> > Bob wrote:
> > >
> > > Dave,
> > >
> > > What I want to do is click on the "Row and column headers" checkbox so that
> > > the row and column headers are not displayed. Then I want to prevent users
> > > from re-displaying the row and column headers (i.e., unchecking the checkbox).
> > >
> > > Can you tell me how to disable the "Row and column headers" checkbox in VBA?
> > >
> > > Thanks,
> > > Bob
> > >
> > > "Dave Peterson" wrote:
> > >
> > > > I don't think you can change any of those built-in dialogs.
> > > >
> > > > You can disable them, but you can't change them.
> > > >
> > > > Bob wrote:
> > > > >
> > > > > Is there a way in VBA to disable the "Row and column headers" option within
> > > > > the Tools | Options... | View tab menu so that a user cannot check (or
> > > > > uncheck) the checkbox? I would like to do this without having to create a
> > > > > custom toolbar or menu.
> > > > >
> > > > > Thanks in advance for any guidance.
> > > >
> > > > --
> > > >
> > > > Dave Peterson
> > > >

> >
> > --
> >
> > Dave Peterson
> >

 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      4th Sep 2007
Basically, that's what Dave's code does. But he didn't mention restoring it
before closing the program.

"Bob" wrote:

> Dave,
> As a second option, I guess I could do something like:
>
> Private Sub Worksheet_Activate()
> ActiveWindow.DisplayHeadings = False
> End Sub
>
> Thanks again for all your help and advice.
> Bob
>
>
> "Dave Peterson" wrote:
>
> > Nope. I can't.
> >
> > You don't have that kind of granular control over the dialogs in excel.
> >
> > In my USA version of Excel, I could use a line like this:
> >
> > With Application.CommandBars("worksheet menu bar").Controls("Tools")
> > '.enabled or .visible????
> > .Controls("Options...").Enabled = False
> > End With
> >
> > to try to prevent users from clicking on Tools|Options...
> >
> > But if they reset the toolbar or disabled macros, then it would not work very
> > well!
> >
> > Bob wrote:
> > >
> > > Dave,
> > >
> > > What I want to do is click on the "Row and column headers" checkbox so that
> > > the row and column headers are not displayed. Then I want to prevent users
> > > from re-displaying the row and column headers (i.e., unchecking the checkbox).
> > >
> > > Can you tell me how to disable the "Row and column headers" checkbox in VBA?
> > >
> > > Thanks,
> > > Bob
> > >
> > > "Dave Peterson" wrote:
> > >
> > > > I don't think you can change any of those built-in dialogs.
> > > >
> > > > You can disable them, but you can't change them.
> > > >
> > > > Bob wrote:
> > > > >
> > > > > Is there a way in VBA to disable the "Row and column headers" option within
> > > > > the Tools | Options... | View tab menu so that a user cannot check (or
> > > > > uncheck) the checkbox? I would like to do this without having to create a
> > > > > custom toolbar or menu.
> > > > >
> > > > > Thanks in advance for any guidance.
> > > >
> > > > --
> > > >
> > > > Dave Peterson
> > > >

> >
> > --
> >
> > Dave Peterson
> >

 
Reply With Quote
 
=?Utf-8?B?Qm9i?=
Guest
Posts: n/a
 
      4th Sep 2007
Thanks for the suggestion. However, I would prefer to not mess with the menus.


"JLGWhiz" wrote:

> Basically, that's what Dave's code does. But he didn't mention restoring it
> before closing the program.
>
> "Bob" wrote:
>
> > Dave,
> > As a second option, I guess I could do something like:
> >
> > Private Sub Worksheet_Activate()
> > ActiveWindow.DisplayHeadings = False
> > End Sub
> >
> > Thanks again for all your help and advice.
> > Bob
> >
> >
> > "Dave Peterson" wrote:
> >
> > > Nope. I can't.
> > >
> > > You don't have that kind of granular control over the dialogs in excel.
> > >
> > > In my USA version of Excel, I could use a line like this:
> > >
> > > With Application.CommandBars("worksheet menu bar").Controls("Tools")
> > > '.enabled or .visible????
> > > .Controls("Options...").Enabled = False
> > > End With
> > >
> > > to try to prevent users from clicking on Tools|Options...
> > >
> > > But if they reset the toolbar or disabled macros, then it would not work very
> > > well!
> > >
> > > Bob wrote:
> > > >
> > > > Dave,
> > > >
> > > > What I want to do is click on the "Row and column headers" checkbox so that
> > > > the row and column headers are not displayed. Then I want to prevent users
> > > > from re-displaying the row and column headers (i.e., unchecking the checkbox).
> > > >
> > > > Can you tell me how to disable the "Row and column headers" checkbox in VBA?
> > > >
> > > > Thanks,
> > > > Bob
> > > >
> > > > "Dave Peterson" wrote:
> > > >
> > > > > I don't think you can change any of those built-in dialogs.
> > > > >
> > > > > You can disable them, but you can't change them.
> > > > >
> > > > > Bob wrote:
> > > > > >
> > > > > > Is there a way in VBA to disable the "Row and column headers" option within
> > > > > > the Tools | Options... | View tab menu so that a user cannot check (or
> > > > > > uncheck) the checkbox? I would like to do this without having to create a
> > > > > > custom toolbar or menu.
> > > > > >
> > > > > > Thanks in advance for any guidance.
> > > > >
> > > > > --
> > > > >
> > > > > Dave Peterson
> > > > >
> > >
> > > --
> > >
> > > Dave Peterson
> > >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling &[Time] macro in headers and footers John Mirabella Microsoft Excel Discussion 1 21st Jan 2010 06:22 PM
lookup using column headers and row headers Memphus01 Microsoft Excel Misc 1 13th Apr 2009 04:57 PM
Hide Column Headers but not row (Headers) Kevan Gradwell Microsoft Excel Programming 1 16th Mar 2007 05:59 PM
Column Headers are numeric as the Row Headers =?Utf-8?B?TWFyayBCdXJzaWFu?= Microsoft Excel Crashes 3 21st Feb 2007 04:56 PM
How to set Column headers as row headers in Data grid control =?Utf-8?B?VlIgUmF2aW51dGhhbGE=?= Microsoft Dot NET Framework Forms 1 3rd May 2005 12:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:34 PM.