Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default autofit problem

when i use autofit, in code or just clicking the column divider, it doesn't
always autofit all of the columns.

using this code
..Columns("A:Q").AutoFit

i sometimes have one column that displays some ###'s, in this case it was column
D. the column has actual numbers in it, not a formula.

and ideas?

--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default autofit problem

What happens if you widen the columns as far as you can, then autofit?

With ActiveSheet
With .Columns("A:Q")
.ColumnWidth = 255
.AutoFit
End With
End With

Maybe it'll help.



Gary Keramidas wrote:

when i use autofit, in code or just clicking the column divider, it doesn't
always autofit all of the columns.

using this code
.Columns("A:Q").AutoFit

i sometimes have one column that displays some ###'s, in this case it was column
D. the column has actual numbers in it, not a formula.

and ideas?

--

Gary


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default autofit problem

no luck with that, either, i have tried 20 in the past, but never 255.

--


Gary


"Dave Peterson" wrote in message
...
What happens if you widen the columns as far as you can, then autofit?

With ActiveSheet
With .Columns("A:Q")
.ColumnWidth = 255
.AutoFit
End With
End With

Maybe it'll help.



Gary Keramidas wrote:

when i use autofit, in code or just clicking the column divider, it doesn't
always autofit all of the columns.

using this code
.Columns("A:Q").AutoFit

i sometimes have one column that displays some ###'s, in this case it was
column
D. the column has actual numbers in it, not a formula.

and ideas?

--

Gary


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default autofit problem

Does that mean you tried 255 and it failed?

If you know which columns need to be widened, you could always just add a little
to that columnwidth after autofitting.

with .columns("d")
.autofit
.columnwidth = .columnwidth + 2 'as small as you need
end with

Gary Keramidas wrote:

no luck with that, either, i have tried 20 in the past, but never 255.

--

Gary

"Dave Peterson" wrote in message
...
What happens if you widen the columns as far as you can, then autofit?

With ActiveSheet
With .Columns("A:Q")
.ColumnWidth = 255
.AutoFit
End With
End With

Maybe it'll help.



Gary Keramidas wrote:

when i use autofit, in code or just clicking the column divider, it doesn't
always autofit all of the columns.

using this code
.Columns("A:Q").AutoFit

i sometimes have one column that displays some ###'s, in this case it was
column
D. the column has actual numbers in it, not a formula.

and ideas?

--

Gary


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default autofit problem

yes, 255 failed, it seems to autofitting on the column header in row 1, not any
of the values below it. is this normal?

--


Gary


"Dave Peterson" wrote in message
...
Does that mean you tried 255 and it failed?

If you know which columns need to be widened, you could always just add a
little
to that columnwidth after autofitting.

with .columns("d")
.autofit
.columnwidth = .columnwidth + 2 'as small as you need
end with

Gary Keramidas wrote:

no luck with that, either, i have tried 20 in the past, but never 255.

--

Gary

"Dave Peterson" wrote in message
...
What happens if you widen the columns as far as you can, then autofit?

With ActiveSheet
With .Columns("A:Q")
.ColumnWidth = 255
.AutoFit
End With
End With

Maybe it'll help.



Gary Keramidas wrote:

when i use autofit, in code or just clicking the column divider, it
doesn't
always autofit all of the columns.

using this code
.Columns("A:Q").AutoFit

i sometimes have one column that displays some ###'s, in this case it was
column
D. the column has actual numbers in it, not a formula.

and ideas?

--

Gary

--

Dave Peterson


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default autofit problem

Not that I've seen.

Gary Keramidas wrote:

yes, 255 failed, it seems to autofitting on the column header in row 1, not any
of the values below it. is this normal?

--

Gary

"Dave Peterson" wrote in message
...
Does that mean you tried 255 and it failed?

If you know which columns need to be widened, you could always just add a
little
to that columnwidth after autofitting.

with .columns("d")
.autofit
.columnwidth = .columnwidth + 2 'as small as you need
end with

Gary Keramidas wrote:

no luck with that, either, i have tried 20 in the past, but never 255.

--

Gary

"Dave Peterson" wrote in message
...
What happens if you widen the columns as far as you can, then autofit?

With ActiveSheet
With .Columns("A:Q")
.ColumnWidth = 255
.AutoFit
End With
End With

Maybe it'll help.



Gary Keramidas wrote:

when i use autofit, in code or just clicking the column divider, it
doesn't
always autofit all of the columns.

using this code
.Columns("A:Q").AutoFit

i sometimes have one column that displays some ###'s, in this case it was
column
D. the column has actual numbers in it, not a formula.

and ideas?

--

Gary

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
autofit row problem joeeng Excel Discussion (Misc queries) 1 July 25th 05 06:10 PM
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM
Row Autofit Problem Peter Graff Excel Discussion (Misc queries) 3 January 18th 05 10:10 PM
Excel WordWrap/AutoFit Problem - the row becomes too tall Aaron Glazer Excel Programming 0 September 11th 04 03:12 PM
Column Autofit Problem Graham Haughs Excel Programming 7 August 9th 04 02:25 PM


All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"