Qlik Community

Community Corner

Discussion board for questions about the Qlik Community, its features, sharing information, general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Highlighted
sathish_expo
Contributor

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

Tags (4)
5 Replies
whiteline
Honored Contributor II

Re: Freeze panes while generating a Excel file using macros

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.

sathish_expo
Contributor

Re: Freeze panes while generating a Excel file using macros

it is throwing below mentioned error

Select method of Range class failed

whiteline
Honored Contributor II

Re: Freeze panes while generating a Excel file using macros

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.

sathish_expo
Contributor

Re: Freeze panes while generating a Excel file using macros

Can u show any sample how to do that

whiteline
Honored Contributor II

Re: Freeze panes while generating a Excel file using macros

airSheet.Activate