ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   .FreezePanes (https://www.excelbanter.com/excel-programming/372801-freezepanes.html)

Bob McClellan

.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.



Jim Thomlinson

.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.




Bob McClellan

.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.






NickHK[_3_]

.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.








Bob McClellan

.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.










NickHK[_3_]

.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.












Bob McClellan

.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.














Bob McClellan

.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.














NickHK[_3_]

.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.
















Bob McClellan

.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.



















All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com