Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Freeze panes while generating a Excel file using macros

Hi all,

I want to freeze all panes in my four worksheets.i am using the below code to freeze panes in sheet1 code

airSheet.Range("A2").Select

'XLApp.ActiveWindow.FreezePanes = True

if i use this same code in sheet2 also means it is throwing subscript out of range exception

kindly provide me a solution

Regards,

Sivaramakrishnan K

5 Replies
whiteline
Master II
Master II

Hi.

It's a VBA question, not QlikView.

You'd better to post it on the corresponding forum.

In addition your post is in the wrong discussion section.

Anonymous
Not applicable
Author

it is throwing below mentioned error

Select method of Range class failed

whiteline
Master II
Master II

Yes.

It's because you don't bother yourself to read the VBA for Excel documentation.

You need to Activate the sheet before performing selections on it.

Anonymous
Not applicable
Author

Can u show any sample how to do that

whiteline
Master II
Master II

airSheet.Activate