Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 1st, 2004, 12:37 PM
Authorized User
 
Join Date: Jun 2003
Location: Irvine, CA, USA.
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
Reply With Quote
  #2 (permalink)  
Old July 1st, 2004, 01:00 PM
Authorized User
 
Join Date: Jun 2003
Location: Irvine, CA, USA.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 05:06 AM
Column width immanuelsamuel Oracle 2 March 13th, 2004 09:30 AM



All times are GMT -4. The time now is 05:52 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.