Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Make protected hidden row & column headers appear and rehide based ona cell's value

I need to resize select columns and rows whenever A1="Resize".
Columns and rows are hidden and the sheet is password protected
(password="sparrow"). When A1="Resize", I need the hidden row and
column headers to appear so another macro I have will adjust select
column and row widths and heights. When finished, I need to delete
the A1 "Resize" entry and the headers to once again be hidden and
protected.

Following is the resize macro but it currently does not affect
headers:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Columns("C:C").ColumnWidth = Range("A1").Value
End If
If Target.Address = Range("A2").Address Then
Rows("3:3").RowHeight = Range("A2").Value
End If
End Sub

Thanks for any help that can be given.

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
CM CM is offline
external usenet poster
 
Posts: 136
Default Make protected hidden row & column headers appear and rehide based

ActiveWindow.DisplayHeadings = False

"Michael Lanier" wrote:

I need to resize select columns and rows whenever A1="Resize".
Columns and rows are hidden and the sheet is password protected
(password="sparrow"). When A1="Resize", I need the hidden row and
column headers to appear so another macro I have will adjust select
column and row widths and heights. When finished, I need to delete
the A1 "Resize" entry and the headers to once again be hidden and
protected.

Following is the resize macro but it currently does not affect
headers:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Columns("C:C").ColumnWidth = Range("A1").Value
End If
If Target.Address = Range("A2").Address Then
Rows("3:3").RowHeight = Range("A2").Value
End If
End Sub

Thanks for any help that can be given.

Michael

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Make protected hidden row & column headers appear and rehidebased

Thanks CM. It works as expected.

Michael
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
Re-post: Code to make sheet very hidden based on date wx4usa Excel Discussion (Misc queries) 1 December 30th 08 06:19 AM
specify a specific column to input text based on another cell's content jsd219 Excel Programming 10 October 27th 06 11:04 PM
make column values column headers dunskii Excel Discussion (Misc queries) 5 September 19th 06 12:00 PM
How do I make Excel column headers alphabetical... njord10 Excel Discussion (Misc queries) 2 May 24th 06 11:15 AM
I forgot my password in a protected column, is it hidden somewhere Daphine Excel Worksheet Functions 2 December 21st 05 08:44 PM


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