Help with Excel FreezePanes from code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can't get this to work. Please help. Here's my code:

Dim xl As New Spreadsheet

xl.Selection.Cells(2, 2).Activate()
xl.ActiveWindow.FreezePanes = True

There's no errors . . . it just doesn't set up the FreezePanes stuff.
 
Dim xl As Worksheet

Set xl = Activesheet
xl.Selection.Cells(2, 2).Activate()
xl.ActiveWindow.FreezePanes = True
 
That did not help.

BTW, I'm doing this from ASP.NET 2.0 using VB.NET.

Thanks anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top