Freeze Panes programmatically, How?

  • Thread starter Thread starter tmarko
  • Start date Start date
T

tmarko

I would like to set a freeze panes after filling a sheet with dat
programmatically, but cannot find the property for that for a shee
object. Is it possible to accomplish
 
Hi
I suggest you have a look at the macro recorder. Quite usefull if
you're looking for a property :-). Try something like
....
Range("B2").Select
ActiveWindow.FreezePanes = True
....

Frank
 
well I have this application that write to Excel, and I was thinking o
just adding code at the end of the writing Function. The

WkSheet.Range("B7").Select
ActiveWindow.FreezePanes = True

does not seem to work. I only want to have the freezpane in the shee
that I'm writing to.

To Add a macro to my excel addin, isn't that too much hasle for thi
task. I then want to distribute the Addin to a lot of users as packag
 
Maybe:

With wksheet
Application.Goto .Range("a1"), scroll:=True
.Range("b7").Select
ActiveWindow.FreezePanes = False
ActiveWindow.FreezePanes = True
End With

Before you can select the cell (A1 and B7 in my example), you have to select the
sheet.

with wksheet
.select
....

I like application.goto to do the equivalent.
 
Back
Top