Hello,
I have an Access VBA module that outputs the results of a query to an Excel 2007 spreadsheet. I have written the code to format the cells as needed, and everything seems to work except for one thing: for some reason, it just ignores the code I have written for setting column width.
Here is how I have it written right now:
With ExcelWkb.ActiveSheet.Range("A:A")
.ColumnWidth = 21
End With
It seems to me this should work, but it doesn't. It doesn't give me any errors or anthing, it just doesn't do anything. Is my syntax wrong?
Thanks in advance for any help.
I have an Access VBA module that outputs the results of a query to an Excel 2007 spreadsheet. I have written the code to format the cells as needed, and everything seems to work except for one thing: for some reason, it just ignores the code I have written for setting column width.
Here is how I have it written right now:
With ExcelWkb.ActiveSheet.Range("A:A")
.ColumnWidth = 21
End With
It seems to me this should work, but it doesn't. It doesn't give me any errors or anthing, it just doesn't do anything. Is my syntax wrong?
Thanks in advance for any help.