TartanSpecial
New Member
- Joined
- May 29, 2005
- Messages
- 42
Hi there
I've inherited a report from a colleague who's unfortunately left the company and one of the Macros' doesn't seem to work
The code is actually written in Business Objects but it exports the data to Microsoft Excel. The code falls over on
' Resize and format cells
.Cells.VerticalAlignment = xlVAlignCenter
.Columns(2).ColumnWidth = 28
.Columns(2).WrapText = True
.Columns(3).AutoFit
With .Columns(4).Resize(, cellsacross - 1)
.AutoFit
.HorizontalAlignment = xlCenter
End With
The problem seems to arise when there is no data in that column
Does anyone know why this might happen
Thanks very much
Nick
I've inherited a report from a colleague who's unfortunately left the company and one of the Macros' doesn't seem to work
The code is actually written in Business Objects but it exports the data to Microsoft Excel. The code falls over on
' Resize and format cells
.Cells.VerticalAlignment = xlVAlignCenter
.Columns(2).ColumnWidth = 28
.Columns(2).WrapText = True
.Columns(3).AutoFit
With .Columns(4).Resize(, cellsacross - 1)
.AutoFit
.HorizontalAlignment = xlCenter
End With
The problem seems to arise when there is no data in that column
Does anyone know why this might happen
Thanks very much
Nick