Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 199
Default Who Can Expand Chip Pearson's procedure ExportToTextFile?

Hi HONG

I have one more question. you said all the fields need to be
right-alignment. Does that mean if the length of data is longer than 9
like "1234567890", what you want is not "123456789" but "234567890"?
this is what this code gives you.

Keiji

HONG wrote:
On May 11, 7:20 am, "macropod" wrote:
Hi Hong,

You could simply insert 'R' into all cells in row 2. Alternatively, simply delete:

If Left(Trim(UCase(WkSht.Cells(2, CurrentCol))), 1) = "R" Then

and
Else
strOutput = strOutput & Left(WkSht.Cells(CurrentRow, CurrentCol) & Space(255), _
WkSht.Cells(1, CurrentCol))
End If

Having done that and, assuming you don't want the 'R' row, you might want to change:
For CurrentRow = 3 To MaxRow
to
For CurrentRow = 2 To MaxRow

--
Cheers
macropod
[Microsoft MVP - Word]

"HONG" wrote in ...

On May 10, 9:17 pm, "macropod" wrote:

Dear macropod:

Your code works like a chime. May I ask one more help:canyou make
all the fields right-alignment?

Thank you again.

H.Z.


Thank you, macropod, Jacob, and Keiji for your generous help.
Macropod, your code saves hours of my head-scratching.

H.Z.

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
Chip Pearson's DistinctValues function Mike Fogleman[_2_] Excel Programming 9 March 22nd 09 04:24 PM
Chip Pearson's NewWorkDays formula Pete Rooney Excel Discussion (Misc queries) 9 August 9th 08 01:57 AM
DeleteDuplicatesViaFilter From Chip Pearson's Website JohnHB Excel Programming 1 April 11th 07 09:06 PM
How to Use Chip Pearson's Text Import Code [email protected] Excel Programming 12 August 23rd 06 02:28 PM
Chip Pearson's Forum Etiquette Gary L Brown New Users to Excel 0 January 20th 06 07:22 PM


All times are GMT +1. The time now is 07:11 PM.

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

About Us

"It's about Microsoft Excel"