Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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
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
password protected page not opening by web query vive2567 Excel Worksheet Functions 0 January 13th 06 03:20 AM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM
bypass password when update linking of password protected file Yan Excel Discussion (Misc queries) 1 February 7th 05 11:29 PM
How can I use web query with a password protected page? claytorm[_3_] Excel Programming 6 August 22nd 04 08:39 PM
Web query on password protected page claytorm[_9_] Excel Programming 0 August 19th 04 01:05 PM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"