I've got some VBA code to build an Excel file on the fly and generate with data from my access tables.
The code breaks when I try to export a memo field which is too long (haven't had time to character count yet - I'm thinking its over 256. I've made the data small to test and it works fine (e.g. 50 chars).
I knew there was an issue with exporting large memo fields to Excel ... but thought this was related to using the export option within Access rather than writing to Excel via VBA.
Can anyone advise of a workaround. The field contains "Action Updates" which, by their very nature may be long. Therefore I need to be able to do this. Thanks.
The code breaks when I try to export a memo field which is too long (haven't had time to character count yet - I'm thinking its over 256. I've made the data small to test and it works fine (e.g. 50 chars).
Code:
With XLApp.Selection
.Value = rsA("Action_Updates")
.WrapText = True
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End With
I knew there was an issue with exporting large memo fields to Excel ... but thought this was related to using the export option within Access rather than writing to Excel via VBA.
Can anyone advise of a workaround. The field contains "Action Updates" which, by their very nature may be long. Therefore I need to be able to do this. Thanks.