By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

Frozen Rows and Columns

P: 18
I need to acquire the number of frozen rows and columns of an Excel worksheet. How can I do this in VBA?

Thanks

Bertie
May 8 '08 #1
Share this Question
Share on Google+
3 Replies


P: 58
This seems to work...
'--
Sub WhichOnes()
Dim x As Variant
Dim y As Variant
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
x = ActiveWindow.ScrollRow
If x > 1 Then
x = "Rows 1:" & x - 1 & " are frozen "
Else
x = "No rows are frozen "
End If

y = ActiveWindow.ScrollColumn
If y > 1 Then
y = "Columms 1:" & y - 1 & " are frozen "
Else
y = "No columns are frozen "
End If
MsgBox x & vbCr & y
End Sub
'--
I need to acquire the number of frozen rows and columns of an Excel worksheet. How can I do this in VBA?

Thanks

Bertie
May 8 '08 #2

P: 18
Thanks a lot! Exactly what I was looking for.

B
May 12 '08 #3

P: 58
You are welcome. The feedback is appreciated.



Thanks a lot! Exactly what I was looking for.

B
May 14 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.