[AccessD] Writing To Excel From Access Code

Erwin Craps - IT Helps Erwin.Craps at ithelps.be
Wed Apr 13 06:41:22 CDT 2005


One more remark.

Are you sure the square are control charaters?

You also could have an accented character (ASC > 127) that has been
replaced by something else because the font type is not correct for
displaying that character.
In this case you will choose the appropriate fonttype for that cell or
sheet.

Dooing a ASC() on that character will show you this.

 Erwin

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Paul Hartland
(ISHARP)
Sent: Wednesday, April 13, 2005 1:19 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Writing To Excel From Access Code

What I mean by CTRL characters is instead of a carriage return, Excel
shows a small square box.  Sorry for any confusion.. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Erwin Craps -
IT Helps
Sent: 13 April 2005 11:58
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Writing To Excel From Access Code


Not sure what you mean with CTRL characters?
But this may help

replace( "123crLfabc","crLf", vblf)

OF course you need to create a function to replace all CTRL
charachters....

 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
paul.hartland at fsmail.net
Sent: Wednesday, April 13, 2005 12:34 PM
To: accessd
Subject: [AccessD] Writing To Excel From Access Code

To all,

I have an access database which grabs a certain recordset containing
JobNo, StartTime, PrintAddress and EmployeeRole and writes out to an
Excel spreadsheet.  I am using the following code to put the fields
together

strDayWork = JobNo &  "                      " & StartTime & vbcrlf &
PrintAddress & vbcrlf & EmployeeRole

and uses the command .Cells(intExcelRow, intExcelCol) = strDayWork to
put the data in the specific cell.  

The problem is the CTRL characters for the return code also show up in
Excel, does anyone know a way of how to remove these from the Excel
view.

Thanks in advance for all your help..

Paul Hartland

-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at:
http://www.wanadoo.co.uk/help/id/7098.htm
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list