forums Computer Tutorials Computer Help and Spyware Removal File DatabaseUninstall Database Windows Startup Programs Database Computer Resources Computer Glossary Forums Computer Help and Spyware Removal
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Vb.net Freeze Pane In Excel, Excel 2007 w/VS2005
RADIUM-V Interac...
post Mar 12 2008, 05:59 PM
Post #1


Forum Regular
***

Group: Members
Posts: 155
Joined: 9-December 06
From: Somewhere East of Where You Are (think about it)
Member No.: 100,323



So here's the situation. I'm pulling data from SQL and putting it into an Excel Sheet. I want to control formatting, and I want to be able to freeze a specific row when scrolling. I've seen some examples, but they're either for an older version of VB or an older version of Office (of which I'm using Ultimate 2007).

Are there any controls to use? Any help will be greatly appreciated.

Thanks,
John


--------------------
Go to the top of the page
 
+Quote Post
sheril
post Apr 19 2008, 02:43 AM
Post #2


New Member
*

Group: Members
Posts: 1
Joined: 19-April 08
Member No.: 203,928



while you writing u can format the page.

follow this and check it

http://vb.net-informations.com/excel-2007/...page_format.htm

Go to the top of the page
 
+Quote Post
groovicus
post Apr 19 2008, 08:51 AM
Post #3


Hail Groovicus!
******

Group: Site Admin
Posts: 5,698
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



When you have your spreadsheet open in Excel, highlight the row or columns that you want frozen. Click the view tab at the top. In the Windows section of the ribbon is an option to 'freeze panes'. Click on that, and select the first option to freeze what you selected. Click it again to unfreeze the panes.


--------------------
Go to the top of the page
 
+Quote Post
RADIUM-V Interac...
post Apr 20 2008, 01:03 PM
Post #4


Forum Regular
***

Group: Members
Posts: 155
Joined: 9-December 06
From: Somewhere East of Where You Are (think about it)
Member No.: 100,323



QUOTE(groovicus @ Apr 19 2008, 08:51 AM) *
When you have your spreadsheet open in Excel, highlight the row or columns that you want frozen. Click the view tab at the top. In the Windows section of the ribbon is an option to 'freeze panes'. Click on that, and select the first option to freeze what you selected. Click it again to unfreeze the panes.



See, that would work, but I'm creating each spreadsheet from scratch in VB.NET. I need to be able to make the panes frozen with code control, not actually going to the sheet and doing it. The whole thing is automated, including this.


--------------------
Go to the top of the page
 
+Quote Post
groovicus
post Apr 20 2008, 03:57 PM
Post #5


Hail Groovicus!
******

Group: Site Admin
Posts: 5,698
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



Something like this?
CODE
Dim wb As Excel.Workbook
        Dim ex As New Excel.Application
        wb = ex.Workbooks.Add
        Dim sheet As Excel.Worksheet = wb.Worksheets.Add
        ' Select the row above of what you want to freeze
        sheet.Rows(2).Select()
        sheet.Application.ActiveWindow.FreezePanes = True
        ex.Visible = True


I nabbed that from Experts Exchange.


--------------------
Go to the top of the page
 
+Quote Post
RADIUM-V Interac...
post May 2 2008, 04:12 PM
Post #6


Forum Regular
***

Group: Members
Posts: 155
Joined: 9-December 06
From: Somewhere East of Where You Are (think about it)
Member No.: 100,323



I was hoping I didn't have to go that route, with physically selecting the area. Oh well, at least it's not as bad as adding a Totals rows to the end of the data like I have to anyway. Hail Groovicus!


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19th July 2008 - 08:34 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.