View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Daniel Daniel is offline
external usenet poster
 
Posts: 354
Default format all column width

Can I write sub in sub

sub ABC()


sub setcolumnwidht()
end sub
......
.......
end sub


Thanks
Daniel

"Daniel" wrote:


Don't know why it's not works. I have diferent column widths ??
Daniel

"Otto Moehrbach" wrote:

Daniel
Include the "Next" line as well. HTH Otto
"Daniel" wrote in message
...
Thanks Tom

If I have an existing sub, I just have to add below phase to my sub ?

for each sh in activeworkbook.Worksheets
sh.Columns.ColumnWidth = 8.43

Thanks

"Tom Ogilvy" wrote:

Sub SetColumnWidth()

for each sh in activeworkbook.Worksheets
sh.Columns.ColumnWidth = 8.43
Next

end Sub

--
Regards,
Tom Ogilvy

"Daniel" wrote:

How can I write a macro so that it can format all column width equal to
standard
or exp=20
THe funtion if nice should apply for all sheets in a workbook?

Thanks
Daniel