#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default columns

hi,

i want to be able to hide and unhide columns in excel depending upon a value
selected and then veryfying whether or not a value entered is correct. but
the only disadvantage of this is that any user who does not enter the value
correctly can just go to the sheet and select column -- unhide. i want to
prevent this from happening.

what is the best way to handle this?

thanks in advance,
geebee

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default columns

One way might be to remove the row and column headers. Tools - Options -
View - uncheck Row & Column Headers.

This will make it distinctly more difficult to unhide the columns without
having to resort to some form of protection.
--
HTH...

Jim Thomlinson


"geebee" wrote:

hi,

i want to be able to hide and unhide columns in excel depending upon a value
selected and then veryfying whether or not a value entered is correct. but
the only disadvantage of this is that any user who does not enter the value
correctly can just go to the sheet and select column -- unhide. i want to
prevent this from happening.

what is the best way to handle this?

thanks in advance,
geebee

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default columns

On 27 May, 16:33, geebee (noSPAMs) wrote:
*i want to
prevent this from happening.
what is the best way to handle this?


This may not be the _best_ way, but will work. Just turn off the menu
items.

Application.CommandBars("Worksheet Menu
Bar").Controls("Format").Controls("&Column").Contr ols("&Unhide").Enabled
= False
Application.CommandBars("Column").Controls("&Unhid e").Enabled = False

You might need to re-do the Column menu on the workbook_RightClick
event.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default columns

hi,

i have the following:

If Sheets("detail").Range("IV1").Value = "admin" Then
Sheets("detail").Select
Columns("A").Visible = True
Else
Sheets("detail").Select
Columns("G").Visible = False
End If

but i am getting an "object does not support this method" error message. why?

thanks in advance,
geebee


"Jim Thomlinson" wrote:

One way might be to remove the row and column headers. Tools - Options -
View - uncheck Row & Column Headers.

This will make it distinctly more difficult to unhide the columns without
having to resort to some form of protection.
--
HTH...

Jim Thomlinson


"geebee" wrote:

hi,

i want to be able to hide and unhide columns in excel depending upon a value
selected and then veryfying whether or not a value entered is correct. but
the only disadvantage of this is that any user who does not enter the value
correctly can just go to the sheet and select column -- unhide. i want to
prevent this from happening.

what is the best way to handle this?

thanks in advance,
geebee

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default columns

hi,

i am getting an "invalid procedure call or argument". on the following:

Application.CommandBars("Worksheet
MenuBar").Controls("Format").Controls("&Column").C ontrols("&Unhide").Enabled
= True


thanks in advance,
geebee


"atpgroups" wrote:

On 27 May, 16:33, geebee (noSPAMs) wrote:
i want to
prevent this from happening.
what is the best way to handle this?


This may not be the _best_ way, but will work. Just turn off the menu
items.

Application.CommandBars("Worksheet Menu
Bar").Controls("Format").Controls("&Column").Contr ols("&Unhide").Enabled
= False
Application.CommandBars("Column").Controls("&Unhid e").Enabled = False

You might need to re-do the Column menu on the workbook_RightClick
event.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default columns

On 27 May, 20:05, geebee (noSPAMs) wrote:

i am getting an "invalid procedure call or argument". *on the following:

Application.CommandBars("Worksheet
MenuBar").Controls("Format").Controls("&Column").C ontrols("&Unhide").Enable d
= True


Is that space in the middle of"Enabled" really there? That will do
it.
Alternatively, find your own way to the menu item..
Select the words "Application.CommandBars" and then right-click and
"Add watch"
You will then see the tree of all the command bar properties, and you
can burrow on down the tree. I suspect that (for whatever reason) your
commandbars have different names

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
putting 2 long columns into multiple columns in excel page and sor bob_mhc Excel Discussion (Misc queries) 1 April 25th 08 07:51 AM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
Excel button :: Filter columns by value - possible? Additionally, hide certain columns No Name Excel Programming 4 December 28th 04 07:44 PM
Pivot Table Creating New Columns that Subtract Two Existing Columns den4673 Excel Discussion (Misc queries) 3 December 17th 04 01:31 PM


All times are GMT +1. The time now is 08:47 AM.

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"