lock first row and first column WITHOUT selecting Cell "B2"first?
On Apr 26, 11:22*pm, "Helmut Meukel" wrote:
Hi,
I'm new to this group.
From a VB6-Program I create a new workbook with 1 worksheet.
After writing the title row I want to set the first column and the first
row non-scrollable. This is my actual code in the VB6 program:
* * ws.Range("B2").Select
* * ActiveWindow.FreezePanes = True
I tested it, it works.
My Question: is there another way to do this WITHOUT selecting
the cell first? Doing it with an non-active window?
I've searched to no avail, but probably haven't asked the right questions
or used the correct terms. (English isn't my first language).
TIA,
Helmut.
If you want to avoid select for speeding up the code you can use
following line
application.goto reference:=ws.Range("b2"),scroll:=true
|