Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with Excel FreezePanes from code

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Help with Excel FreezePanes from code

Dim xl As Worksheet

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

--
Regards,
Tom Ogilvy


"lanem" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with Excel FreezePanes from code

That did not help.

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

Thanks anyway.

"Tom Ogilvy" wrote:

Dim xl As Worksheet

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

--
Regards,
Tom Ogilvy


"lanem" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems specifying where "freezepanes" occurs using VBA broro183[_66_] Excel Programming 2 April 19th 06 12:00 PM
freezepanes Rob Excel Programming 1 January 6th 06 04:17 PM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM


All times are GMT +1. The time now is 10:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"