Hale, Jim
Jim.Hale at FleetPride.com
Wed Apr 13 10:35:45 CDT 2005
Chr(10) might work Within Excel to break a line within a cell you hit <alt><enter> I just recorded a macro while doing this and here is the resulting code: ActiveCell.FormulaR1C1 = "test" & Chr(10) & " line " & Chr(10) & "break" which produced a cell formatted as test line break Jim Hale -----Original Message----- From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] Sent: Thursday, April 14, 2005 10:20 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Writing To Excel From Access Code Paul: Shot in the dark: try replacing the vbCrLf with either Chr(10) or Chr(13). HTH Rocky Smolin Beach Access Software http://www.e-z-mrp.com 858-259-4334 ----- Original Message ----- From: "Paul Hartland (ISHARP)" <paul.hartland at isharp.co.uk> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Wednesday, April 13, 2005 4:19 AM 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 > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email.