one for the office programmers out there
one for the office programmers out there
Author
Discussion

mr_tony

Original Poster:

6,351 posts

299 months

Friday 20th May 2005
quotequote all
ok, starter for 10 :

Ok, got a component wot i wrote in vb6 that spits data into excel ina nice pretty format for our VP's to um and ahh over. However, I'd like to get the columns to 'autofit' and I can't find the method to call in the excel object reference.

Anyone know what it is? Pint to the first correct response as you'll save me staying here and missing out on one tonight....

Plotloss

67,280 posts

300 months

Friday 20th May 2005
quotequote all
Something along the lines of:

Worksheets("Sheet1" ).Columns("A:I" ).AutoFit

It should be a method of the Columns collection.

>> Edited by Plotloss on Friday 20th May 16:46

pdV6

16,442 posts

291 months

Friday 20th May 2005
quotequote all
Blimey. Quickdraw McPlotty to the rescue...

Incorrigible

13,668 posts

291 months

Friday 20th May 2005
quotequote all
Sorry you can't do it, that's as good as it'll get without me spending weeks on it

mr_tony

Original Poster:

6,351 posts

299 months

Friday 20th May 2005
quotequote all
Plotloss said:
Something along the lines of:

Worksheets("Sheet1" ).Columns("A:I" ).AutoFit

It should be a method of the Columns collection.

>> Edited by Plotloss on Friday 20th May 16:46



Ahhh autofit - thats what it's called - nice one plotty, one beer owed

msdev ref here



>> Edited by mr_tony on Friday 20th May 18:27