Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro - trailing blanks

I am trying to write concatenated individual cells as a record to a
file but it is trimming the trailing blanks in the cell. This is the
code I have:

For RowNdx = StartRow To EndRow
WholeLine = ""
For ColNdx = StartCol To EndCol
CellValue = (Cells(RowNdx, ColNdx).Value)
WholeLine = WholeLine & CellValue
Next ColNdx
Print #FNum, WholeLine
Next RowNdx

If cell1 = "Test " and cell2 = "This ". The result in the file is a
record with "TestThis". How can I get it to write the record as
"Test This"?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate and include trailing blanks Mr_Wilf Excel Discussion (Misc queries) 5 October 23rd 09 10:13 AM
macro to fill in rows with blanks hnyb1 Excel Discussion (Misc queries) 5 September 9th 09 03:26 PM
Fill Blanks Macro LLoraine Excel Discussion (Misc queries) 2 August 29th 07 03:12 PM
Paste Special Skip Blanks not skipping blanks, but overwriting... gsrosin Excel Discussion (Misc queries) 0 February 22nd 05 03:33 AM
Trailing blanks SAS Excel Discussion (Misc queries) 2 January 7th 05 09:42 PM


All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"