View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Resize a password protected page

Unprotect the sheet, run the code, protect the sheet...
'--
Private Sub Worksheet_Change(ByVal Target As Range)
If Me.Range("G15").Value = "Resize" Then
Me.Unprotect "BigBird."
ActiveWindow.DisplayHeadings = False
Me.Columns("C:C").ColumnWidth = Me.Range("C17").Value
Me.Columns("G:G").ColumnWidth = Me.Range("C18").Value
Me.Rows("1:1").RowHeight = Me.Range("C15").Value
Me.Rows("6:6").RowHeight = Me.Range("C16").Value
Me.Protect "BigBird."
End If
End Sub
'--
Jim Cone
Portland, Oregon USA
( http://tinyurl.com/PrimitiveSoftware )




"Michael Lanier"
wrote in message ...
I need to resize a password protected page. The current macro works
great when the page is not password protected.

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("G15").Value = "Resize" Then
ActiveWindow.DisplayHeadings = False
Columns("C:C").ColumnWidth = Range("C17").Value
Columns("G:G").ColumnWidth = Range("C18").Value
Rows("1:1").RowHeight = Range("C15").Value
Rows("6:6").RowHeight = Range("C16").Value
End If
End Sub

Can you help with this. Let's presume the password is "BigBird."
Thanks,
Michael