Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

freeze pane in excel using vbs

635 views
Skip to first unread message

Al

unread,
Oct 30, 2003, 11:24:47 AM10/30/03
to
I have a script that scans ip ranges for vulnerabilities. In the
first row it list what each column is. Is there a way in my vbscript
to define the first row as a freeze pane? thanks

Richard Mueller [MVP]

unread,
Oct 30, 2003, 1:59:31 PM10/30/03
to
Al wrote:

If objExcel is the Excel application, and objSheet is the spreadsheet, the
following will freeze panes to the left of column "B" and above row "5":

objSheet.Select
objSheet.Range("B5").Select
objExcel.ActiveWindow.FreezePanes = True

I demonstrate this in a sample program that writes info to an Excel
spreadsheet and does some formatting at this link:

http://www.rlmueller.net/Write%20to%20Excel.htm

From your description, you want to select "A2" before freezing. That would
freeze just the first row.

--
Richard
Microsoft MVP Scripting and ADSI
HilltopLab web site - http://www.rlmueller.net
--


0 new messages