0

I am trying to automate the cleaning of a worksheet template to create a flat file for database insertion.

Below is my code that's throwing the error. I am trying to unfreeze panes for the worksheet but keep getting the Compile Error: Method or Data Member not found error on that line.

wsPerm is the worksheet I am working on.

'Unhide All Columns
wsPerm.Unprotect Password:="DRP"
wsPerm.Range("A1:FB1").EntireColumn.Hidden = False
wsPerm.FreezePanes = False
wsPerm.Activate
ActiveWindow.FreezePanes = False
wsPerm.Cells.UnMerge

1 Answer 1

3

The .FreezePanes property only works on the Window object type so in your case, remove

wsPerm.FreezePanes = False

Which leaves:

'Unhide All Columns
wsPerm.Unprotect Password:="DRP"
wsPerm.Range("A1:FB1").EntireColumn.Hidden = False
wsPerm.Activate
ActiveWindow.FreezePanes = False
wsPerm.Cells.UnMerge
Sign up to request clarification or add additional context in comments.

1 Comment

Oh my gosh, I thought I tried both methods I didn't realize when I was trying ActiveWindow, I forgot to delete wsPerm.FreezePanes! thank you!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.