antaeusguy
Board Regular
- Joined
- Mar 8, 2010
- Messages
- 81
Hi,
I've about 30 worksheets in 1 workbook.
I wish to freezepanes for each of the worksheets on cell C5.
I wrote this code but it didn't work:
Sub FreezeAll()
Dim WD As Window
For Each WD In Windows
[C5].Select
WD.FreezePanes
Next WD
End Sub
It gives this error message: Compile error: Invalid use of property and highlighted the .FreezePanes words in my code above...
Anyone has any idea what did I did wrong... Thanks in advance!
I've about 30 worksheets in 1 workbook.
I wish to freezepanes for each of the worksheets on cell C5.
I wrote this code but it didn't work:
Sub FreezeAll()
Dim WD As Window
For Each WD In Windows
[C5].Select
WD.FreezePanes
Next WD
End Sub
It gives this error message: Compile error: Invalid use of property and highlighted the .FreezePanes words in my code above...
Anyone has any idea what did I did wrong... Thanks in advance!
Last edited: