writing data into excel cell

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

Hello
I writing record set values into excel cell...
Snippet code:

objXL.Application.Cells(rowcnt, 4).Value = rs!AddressLine1
If Not IsNull(rs!AddressLine2) Then
objXL.Application.Cells(rowcnt, 4).Value =
objXL.Application.Cells(rowcnt, 4).Value & vbLf & rs!AddressLine2
End If
objXL.Application.Cells(rowcnt, 4).Value =
objXL.Application.Cells(rowcnt, 4).Value & vbLf & "third line" 'sth
wrong with this line...

It works fine if I dont write third line into cell and comment out last
line...It write properly and shows properly in excel sheet like

Shop 3101 Knox City Shopping Centre,
425 Burwood Hwy,

But whenever i try to write third line, its shows sth like this...however
its shows proper line feed in value field (which is on top on excel
sheet)...

Shop 3101
Knox
City
Shopping
Centre
425
Burwood
Hwy,
third line

I couldnt figure out whats going on ?? in cell, it shows like above (line
feed affter each word) but in value field its shows proper line feeding...

any help would be appreciated
thanx
 
Hi Dave,

This sounds much more like an Excel question than an Access one. Suggest
you ask in an Excel vba/programming group.
 
Back
Top