Generic Listbox Export Function

Hi all

This new function may be of use to someone.

See the blog post here

I fixed the URL in your post otherwise everyone would go to :stuck_out_tongue:

Not sure how that happened - but thanks anyway :slight_smile: Doh !

Thank you, I have tested it. They first column is missing from the export.

'Write the Rows and Columns for intRow = 0 to intTotalRows for intColumn = 1 to intTotalColumns if pUseQuotes = "YES" then t.Write """"

should be

'Write the Rows and Columns for intRow = 0 to intTotalRows for intColumn = 0 to intTotalColumns if pUseQuotes = "YES" then t.Write """"

Thanks Alex, I’ve updated the downloadable Text version, I’ll update the blog post now. Last minute fiddling with a ‘Count’ column … Doh !

@ Axel - Sorry I spelt your name wrong in my reply - too many mistakes - I’m going to bed ! Cheers - Steve

I’ve changed a few things to use ShowModalWithin and show/hide Extension in the Dialog.


do you loop thru column / rows to save the data ?

Is LB.Cell(-1,-1) not working ?

I’m in a hurry / must go away / no time to read carefully your code…

Hi Axel - I’ll check it out later and update the blog posting if you don’t mind ?
Cheers - S

@Emile Schwarz - Yep, loop the rows and columns. All appears to be working ok ? What problems are you having ? - Steve (Not Axel)

No problem.

Isn’t it faster to save the whole ListBox contents using LB.Cell(-1,-1) ?

@Emile Schwarz - I have no idea - I was’t aware of that facility … how would I insert the delimiters and EOL’s ? Have you got some example code ?


all is in the docs: ListBox.Cell

thus the good old acronym: RTFM ;-:slight_smile:

More seriously: the manuals (& docs) deserve a correct read; not a page 1 to last page read (for docs), but a Class consultation.

a. Delimiter: \tab
b. EOL: EndOfLine ($0A for Unix, $0A for OS X and $0D + $0A for Windows).
Move the Mouse Cursor on the Unix, OS X and Windows entries in the properties list EndOfLine

Now, not tested, if you:

[code]Dim TheText As String

TheText = ListBox1.Cell(-1,-1)
TheText = ReplaceAll(TheText,Chr(9),",")
You can replace all \tab characters with a comma.


Hi Emile: It was around 7 years ago i read the manuals … my memory isn’t what it was :slight_smile:

Besides - when something works well I don’t bother searching for something better.

I’d be interested to see if you could get you example working though ?

Cheers - Steve

I didn’t mean to hurt anyone, I just know people avoid reading manuals / reading manuals is hard / I have sometimes resistances to read manuals / etc.

yes, it works.

Regards from Strasbourg, France… on the other side of the Rhine River.

And the manuals aren’t either. We’re all susceptible to doing things the way we’ve always done them because they work - so why invent new ways? I know I don’t.

Steve thanks for sharing.

so why invent new ways?
I do not invent new ways, but if I get an advice and it makes sense, I will follow it (most of the time).

Also, when I do not recall something (standard for oldsters like me), I check the manuals / docs and eventually ask to get ways.

@Emile Schwarz No hurt feelings here I love to hear of new or different ways of doing things :slight_smile: @ Wayne - You are welcome :slight_smile: