-
Hi
I am working with excel object and VB.
I try to change the width for column B
I write this:
(i declare "ExcelSheet" as Excel.Application)
ExcelSheet.Columns("B").Select
ExcelSheet.Columns("B").Width = 20
the first line is OK and VB raise an error when
it try to pass the second line ( if i delete the second line
i can see that Excel select column B)
can you help me ?
-
This should help....
You don't need to select anything. You can simply do:
Code:
MyWorkSheet.columns(1).columnwidth = iColWidth
Works fine for me, and there's certainly no probs caused by changing the range or deleting rows/columns.
-
Thanks