Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .FreezePanes

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default .FreezePanes

FreezePanes is supported from the window object. so you need something like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .FreezePanes

Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in message
...
FreezePanes is supported from the window object. so you need something
like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default .FreezePanes

Bob,
How are you refering to the other Excel objects then ?
Dim xlApp As Object 'Excel.Application
xlApp.ActiveWindow.FreezePanes = True

NickHK

"Bob McClellan" bl...
Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in
message ...
FreezePanes is supported from the window object. so you need something
like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .FreezePanes

Nick...
Thanks for the reply...

Here is part of the code...
with xlBook.Worksheets(1)
.Range("A3") = "Vendor: " & rtrim(rsDetail.fields("Vendor"))
.Range("A5") = "Machine Number: " & rtrim(rsDetail.fields("Unit"))
.Range("A7") = "Date: " & rsDetail.fields("ReportDate")

.Range("B3") = "ATLM Invoice#: " & rtrim(rsDetail.fields("AtlmInvoice"))
.Range("B5") = "ATLM Ref#: " & rtrim(rsDetail.fields("Ref#"))
.Range("B7") = rsDetail.fields("PaidOn")

.RANGE("A3..D10").FONT.BOLD = TRUE


iD = 11
.Columns("A").ColumnWidth = 33
.Columns("B").ColumnWidth = 15

.Columns("C").ColumnWidth = 11 'RATE
.Columns("C").NumberFormat = "#,##0.00"

.Columns("D").ColumnWidth = 11 'INVOICE NUMBER

.Range("A9..E9").Interior.ColorIndex = 15
'=====================================
' I would like to add a .FreezePanes Here.... but so far an unable to.
' .Range("A11").Select
' .FreezePanes = True
'=====================================

.Range("A10") = "Date"
.Range("B10") = "Refinery"
.Range("C10") = "Rate"
.Range("D10") = "Cust Inv#"




"NickHK" wrote in message
...
Bob,
How are you refering to the other Excel objects then ?
Dim xlApp As Object 'Excel.Application
xlApp.ActiveWindow.FreezePanes = True

NickHK

"Bob McClellan"
bl...
Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in
message ...
FreezePanes is supported from the window object. so you need something
like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default .FreezePanes

Bob,
Yes, because .FreezePanes is a member of the Window object, not the
Worksheet object, as you are in a With block.
So you need the fully qualified hierachy :
xlApp.ActiveWindow.FreezePanes=True
or
xlApp.Windows(1).FreezePanes=True

NickHk

"Bob McClellan" bl...
Nick...
Thanks for the reply...

Here is part of the code...
with xlBook.Worksheets(1)
.Range("A3") = "Vendor: " & rtrim(rsDetail.fields("Vendor"))
.Range("A5") = "Machine Number: " & rtrim(rsDetail.fields("Unit"))
.Range("A7") = "Date: " & rsDetail.fields("ReportDate")

.Range("B3") = "ATLM Invoice#: " &
rtrim(rsDetail.fields("AtlmInvoice"))
.Range("B5") = "ATLM Ref#: " & rtrim(rsDetail.fields("Ref#"))
.Range("B7") = rsDetail.fields("PaidOn")

.RANGE("A3..D10").FONT.BOLD = TRUE


iD = 11
.Columns("A").ColumnWidth = 33
.Columns("B").ColumnWidth = 15

.Columns("C").ColumnWidth = 11 'RATE
.Columns("C").NumberFormat = "#,##0.00"

.Columns("D").ColumnWidth = 11 'INVOICE NUMBER

.Range("A9..E9").Interior.ColorIndex = 15
'=====================================
' I would like to add a .FreezePanes Here.... but so far an unable to.
' .Range("A11").Select
' .FreezePanes = True
'=====================================

.Range("A10") = "Date"
.Range("B10") = "Refinery"
.Range("C10") = "Rate"
.Range("D10") = "Cust Inv#"




"NickHK" wrote in message
...
Bob,
How are you refering to the other Excel objects then ?
Dim xlApp As Object 'Excel.Application
xlApp.ActiveWindow.FreezePanes = True

NickHK

"Bob McClellan" bl...
Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in
message ...
FreezePanes is supported from the window object. so you need something
like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.











  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .FreezePanes

:) Very Cool!
It worked Great.
Thanks Nick...
I was banging my head against the wall on that one.

Thanks again,
bob.


"NickHK" wrote in message
...
Bob,
Yes, because .FreezePanes is a member of the Window object, not the
Worksheet object, as you are in a With block.
So you need the fully qualified hierachy :
xlApp.ActiveWindow.FreezePanes=True
or
xlApp.Windows(1).FreezePanes=True

NickHk

"Bob McClellan"
bl...
Nick...
Thanks for the reply...

Here is part of the code...
with xlBook.Worksheets(1)
.Range("A3") = "Vendor: " & rtrim(rsDetail.fields("Vendor"))
.Range("A5") = "Machine Number: " & rtrim(rsDetail.fields("Unit"))
.Range("A7") = "Date: " & rsDetail.fields("ReportDate")

.Range("B3") = "ATLM Invoice#: " &
rtrim(rsDetail.fields("AtlmInvoice"))
.Range("B5") = "ATLM Ref#: " & rtrim(rsDetail.fields("Ref#"))
.Range("B7") = rsDetail.fields("PaidOn")

.RANGE("A3..D10").FONT.BOLD = TRUE


iD = 11
.Columns("A").ColumnWidth = 33
.Columns("B").ColumnWidth = 15

.Columns("C").ColumnWidth = 11 'RATE
.Columns("C").NumberFormat = "#,##0.00"

.Columns("D").ColumnWidth = 11 'INVOICE NUMBER

.Range("A9..E9").Interior.ColorIndex = 15
'=====================================
' I would like to add a .FreezePanes Here.... but so far an unable to.
' .Range("A11").Select
' .FreezePanes = True
'=====================================

.Range("A10") = "Date"
.Range("B10") = "Refinery"
.Range("C10") = "Rate"
.Range("D10") = "Cust Inv#"




"NickHK" wrote in message
...
Bob,
How are you refering to the other Excel objects then ?
Dim xlApp As Object 'Excel.Application
xlApp.ActiveWindow.FreezePanes = True

NickHK

"Bob McClellan"
bl...
Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in
message ...
FreezePanes is supported from the window object. so you need something
like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.













  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .FreezePanes (One more question)

Nick,
I thought of this after sending the thanks reply.....

I have no problem setting the number format
..Columns("C").NumberFormat = "#,##0.00"

....How do I set the date format?



"NickHK" wrote in message
...
Bob,
Yes, because .FreezePanes is a member of the Window object, not the
Worksheet object, as you are in a With block.
So you need the fully qualified hierachy :
xlApp.ActiveWindow.FreezePanes=True
or
xlApp.Windows(1).FreezePanes=True

NickHk

"Bob McClellan"
bl...
Nick...
Thanks for the reply...

Here is part of the code...
with xlBook.Worksheets(1)
.Range("A3") = "Vendor: " & rtrim(rsDetail.fields("Vendor"))
.Range("A5") = "Machine Number: " & rtrim(rsDetail.fields("Unit"))
.Range("A7") = "Date: " & rsDetail.fields("ReportDate")

.Range("B3") = "ATLM Invoice#: " &
rtrim(rsDetail.fields("AtlmInvoice"))
.Range("B5") = "ATLM Ref#: " & rtrim(rsDetail.fields("Ref#"))
.Range("B7") = rsDetail.fields("PaidOn")

.RANGE("A3..D10").FONT.BOLD = TRUE


iD = 11
.Columns("A").ColumnWidth = 33
.Columns("B").ColumnWidth = 15

.Columns("C").ColumnWidth = 11 'RATE
.Columns("C").NumberFormat = "#,##0.00"

.Columns("D").ColumnWidth = 11 'INVOICE NUMBER

.Range("A9..E9").Interior.ColorIndex = 15
'=====================================
' I would like to add a .FreezePanes Here.... but so far an unable to.
' .Range("A11").Select
' .FreezePanes = True
'=====================================

.Range("A10") = "Date"
.Range("B10") = "Refinery"
.Range("C10") = "Rate"
.Range("D10") = "Cust Inv#"




"NickHK" wrote in message
...
Bob,
How are you refering to the other Excel objects then ?
Dim xlApp As Object 'Excel.Application
xlApp.ActiveWindow.FreezePanes = True

NickHK

"Bob McClellan"
bl...
Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in
message ...
FreezePanes is supported from the window object. so you need something
like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.













  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default .FreezePanes (One more question)

Bob,
Record a macro in Excel of performing the required action.
It will give you basic code that you can tidy up.

Hint: Depending which format you want:
..Columns("D").NumberFormat="yyyy-mm-dd"

NickHK

"Bob McClellan" .gbl...
Nick,
I thought of this after sending the thanks reply.....

I have no problem setting the number format
.Columns("C").NumberFormat = "#,##0.00"

...How do I set the date format?



"NickHK" wrote in message
...
Bob,
Yes, because .FreezePanes is a member of the Window object, not the
Worksheet object, as you are in a With block.
So you need the fully qualified hierachy :
xlApp.ActiveWindow.FreezePanes=True
or
xlApp.Windows(1).FreezePanes=True

NickHk

"Bob McClellan" bl...
Nick...
Thanks for the reply...

Here is part of the code...
with xlBook.Worksheets(1)
.Range("A3") = "Vendor: " & rtrim(rsDetail.fields("Vendor"))
.Range("A5") = "Machine Number: " & rtrim(rsDetail.fields("Unit"))
.Range("A7") = "Date: " & rsDetail.fields("ReportDate")

.Range("B3") = "ATLM Invoice#: " &
rtrim(rsDetail.fields("AtlmInvoice"))
.Range("B5") = "ATLM Ref#: " & rtrim(rsDetail.fields("Ref#"))
.Range("B7") = rsDetail.fields("PaidOn")

.RANGE("A3..D10").FONT.BOLD = TRUE


iD = 11
.Columns("A").ColumnWidth = 33
.Columns("B").ColumnWidth = 15

.Columns("C").ColumnWidth = 11 'RATE
.Columns("C").NumberFormat = "#,##0.00"

.Columns("D").ColumnWidth = 11 'INVOICE NUMBER

.Range("A9..E9").Interior.ColorIndex = 15
'=====================================
' I would like to add a .FreezePanes Here.... but so far an unable to.
' .Range("A11").Select
' .FreezePanes = True
'=====================================

.Range("A10") = "Date"
.Range("B10") = "Refinery"
.Range("C10") = "Rate"
.Range("D10") = "Cust Inv#"




"NickHK" wrote in message
...
Bob,
How are you refering to the other Excel objects then ?
Dim xlApp As Object 'Excel.Application
xlApp.ActiveWindow.FreezePanes = True

NickHK

"Bob McClellan" bl...
Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in
message ...
FreezePanes is supported from the window object. so you need
something like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.















  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default .FreezePanes (One more question)

Yep...
didn't even think to do that.
Thanks again for all the help.
Bob.

"NickHK" wrote in message
...
Bob,
Record a macro in Excel of performing the required action.
It will give you basic code that you can tidy up.

Hint: Depending which format you want:
.Columns("D").NumberFormat="yyyy-mm-dd"

NickHK

"Bob McClellan"
.gbl...
Nick,
I thought of this after sending the thanks reply.....

I have no problem setting the number format
.Columns("C").NumberFormat = "#,##0.00"

...How do I set the date format?



"NickHK" wrote in message
...
Bob,
Yes, because .FreezePanes is a member of the Window object, not the
Worksheet object, as you are in a With block.
So you need the fully qualified hierachy :
xlApp.ActiveWindow.FreezePanes=True
or
xlApp.Windows(1).FreezePanes=True

NickHk

"Bob McClellan"
bl...
Nick...
Thanks for the reply...

Here is part of the code...
with xlBook.Worksheets(1)
.Range("A3") = "Vendor: " & rtrim(rsDetail.fields("Vendor"))
.Range("A5") = "Machine Number: " & rtrim(rsDetail.fields("Unit"))
.Range("A7") = "Date: " & rsDetail.fields("ReportDate")

.Range("B3") = "ATLM Invoice#: " &
rtrim(rsDetail.fields("AtlmInvoice"))
.Range("B5") = "ATLM Ref#: " & rtrim(rsDetail.fields("Ref#"))
.Range("B7") = rsDetail.fields("PaidOn")

.RANGE("A3..D10").FONT.BOLD = TRUE


iD = 11
.Columns("A").ColumnWidth = 33
.Columns("B").ColumnWidth = 15

.Columns("C").ColumnWidth = 11 'RATE
.Columns("C").NumberFormat = "#,##0.00"

.Columns("D").ColumnWidth = 11 'INVOICE NUMBER

.Range("A9..E9").Interior.ColorIndex = 15
'=====================================
' I would like to add a .FreezePanes Here.... but so far an unable to.
' .Range("A11").Select
' .FreezePanes = True
'=====================================

.Range("A10") = "Date"
.Range("B10") = "Refinery"
.Range("C10") = "Rate"
.Range("D10") = "Cust Inv#"




"NickHK" wrote in message
...
Bob,
How are you refering to the other Excel objects then ?
Dim xlApp As Object 'Excel.Application
xlApp.ActiveWindow.FreezePanes = True

NickHK

"Bob McClellan"
bl...
Jim,
Thanks for the reply....

I am working in an ActiveX Script within an SQL DTS package
As far as I know, you can not use .Window or ActiveWindow...
--that's the problem

"Jim Thomlinson" wrote in
message ...
FreezePanes is supported from the window object. so you need
something like
this...

ActiveWindow.FreezePanes = True
--
HTH...

Jim Thomlinson


"Bob McClellan" wrote:

Hello,
I have been trying without success to get the freezepanes
to work from an ActiveX Script within an SQL DTS package.

I keep getting the error that .FreezePanes is not supported.
I have tried many variations of the following .....

..Splitcolumn = 2
..Splitrow = 11
..FreezePanes = True

any help would be much appreciated....
Thanks in advance,
bob.

















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
Help with Excel FreezePanes from code lanem Excel Programming 2 May 24th 06 07:37 PM
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


All times are GMT +1. The time now is 11:49 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"