Click here to Skip to main content
15,921,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

I am exporting the contents of a grid to an Excel Document. The problem i am facing is with freezing the rows using a Com Object. I want to freeze top 3 rows of the document. I tried with the below code but in vain. Can anyone help in theis regard. Thanks in advance

oApp.Range("A1").Select
oApp.ActiveWindow.FreezePanes=True
Posted
Updated 9-Dec-11 1:34am
v3

1 solution

You got a typo in your code. FreezrPanes should be FreezePanes.
VB
Range("A1").Select
ActiveWindow.FreezePanes = True

Good luck!
 
Share this answer
 
Comments
Sufi Saint 9-Dec-11 7:22am    
It was a typing mistake. I ve used FreezePanes

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900