Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 1st, 2004, 12:37 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Set Column Width Programmatically

Hi.

I'm creating an Excel spreadsheet using VB 6.0.
I can't figure out how to change the width of the 2 columns that the sheet requires.

I tried "wshFIC.Columns(,1).Width = 17"
        "wshFIC.Columns(,2).Width = 35"

but this doesn't work.

Any suggestions would be greatly appreciated.

Rita
 
Old July 1st, 2004, 01:00 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found this solution:

     wshFIC.Columns(1).ColumnWidth = 15
     wshFIC.Columns(2).ColumnWidth = 34





Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Column width in Gridview as constant. aarunlal ASP.NET 2.0 Professional 4 April 24th, 2011 12:48 PM
How to set Column width harapraveen XSLT 2 October 23rd, 2007 03:14 AM
Setting Column Width r_ganesh76 Excel VBA 2 February 2nd, 2005 06:06 AM
Column width immanuelsamuel Oracle 2 March 13th, 2004 10:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.