ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   TextBox copying not like windows copying, heh? (https://www.excelbanter.com/excel-programming/337370-textbox-copying-not-like-windows-copying-heh.html)

Antoine

TextBox copying not like windows copying, heh?
 
Hi,

I have a question that Google didn't answer, nor did the numerous PDF I have
about excel programming, and of course, nor did my boss ;)


Here you go!


I have an Excel 2003 workbook with a sheet.
I have a user form.
I have a TextBox in that user form.
I also have a text file outside of Excel.


When I copy paste manually the text file into any cell in the sheet, the
text file gets spreads onto the cells pretty good - You know, most of the
data has its own cell, etc., it looks decent enough to attempt to write a
parser -by the way, my boss told me "its either write a parser or parse the
327 word doc manually into excel" so of course, I feel constrained to ask for
help ...

The problem arise when I have the text file pasted into the user form text
box and then try to have a macro do some parsing. You see, the user gets to
paste from the windows clipboard (in this case a 327 page word doc that I
pasted into a text file first) into the user form textbox, and then press the
Parse! button. The button calls a Parse macro that I wrote in another module.


But when the textbox.text gets copied into a cell with code like ...

myTemp.Range(A7).Value = sData

All the text gets fitted into one cell.


I am trying to reproduce the effect that I get when I manually copy a text
file into a cell : it gets spread into many cells more or less in a readable
fashion.

So my Question is: How do I achieve this effect in coding?

Thank you for your help, kindly,

Antoine Dubuc
Best Buy For Business


Tom Ogilvy

TextBox copying not like windows copying, heh?
 
See one possible answer to your later posting of this question.

--
Regards,
Tom Ogilvy
"Antoine" wrote in message
...
Hi,

I have a question that Google didn't answer, nor did the numerous PDF I

have
about excel programming, and of course, nor did my boss ;)


Here you go!


I have an Excel 2003 workbook with a sheet.
I have a user form.
I have a TextBox in that user form.
I also have a text file outside of Excel.


When I copy paste manually the text file into any cell in the sheet, the
text file gets spreads onto the cells pretty good - You know, most of the
data has its own cell, etc., it looks decent enough to attempt to write a
parser -by the way, my boss told me "its either write a parser or parse

the
327 word doc manually into excel" so of course, I feel constrained to ask

for
help ...

The problem arise when I have the text file pasted into the user form text
box and then try to have a macro do some parsing. You see, the user gets

to
paste from the windows clipboard (in this case a 327 page word doc that I
pasted into a text file first) into the user form textbox, and then press

the
Parse! button. The button calls a Parse macro that I wrote in another

module.


But when the textbox.text gets copied into a cell with code like ...

myTemp.Range(A7).Value = sData

All the text gets fitted into one cell.


I am trying to reproduce the effect that I get when I manually copy a

text
file into a cell : it gets spread into many cells more or less in a

readable
fashion.

So my Question is: How do I achieve this effect in coding?

Thank you for your help, kindly,

Antoine Dubuc
Best Buy For Business




Antoine

TextBox copying not like windows copying, heh?
 

Hi Tom,

Thanks for answering. I know I posted this question before, but I never got
any answer, could you help me out?

Thanks,

Antoine

"Tom Ogilvy" wrote:

See one possible answer to your later posting of this question.

--




Antoine

THere you are again. eh?
 
Hi Tom,

Now I understand where my later posting is ;)

Antoine


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com