![]() |
Resize a password protected page
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 |
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 |
Resize a password protected page
Thanks Jim for your help. I'll give it a try in the morning when I
can think better. Michael |
All times are GMT +1. The time now is 07:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com