Thread: How can I...
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2321_] Rick Rothstein \(MVP - VB\)[_2321_] is offline
external usenet poster
 
Posts: 1
Default How can I...

See inline comments...

OMFG!!! THANK YOU!!!


You are quite welcome.


Please note (for other potential viewers) that I had to delete the
reoccuring = ALLINFOV at the end of the line that begins with
ALLINFOV=


??? If I understand you correctly, you are talking about this line, right?

Text31.Text = ALLINFOV

That was your line to display the result of the concatenation so the user
could verify it. You originally had this comment above it...

now ALLINFOV is a variable that is equal to the entire
line of info I want to write to file

and this comment next to it....

now text31 is the line of ALLINFOV

so I am not sure why you are deleting it.


and I had to omit all underscoring. And of corse replace the C: my file
references but other then that it works BEAUTIFULLY!!!!!!!!!!


Actually, you didn't have to do that... the long lines I posted that had
them would have worked fine had you just copy/pasted them into your code
window. A <space character followed by an underscore **at the end of a
line** is called a "line continuation sequence"... VB knows to automatically
link the line with that to the next line following it and treat them as if
they were joined into a single line. The advantage of using line
continuation sequences is that your code becomes more readable (you don't
have to scroll way off to the right to see your whole line of code. The only
thing to watch out for is you cannot use them in the middle of a text
constant. So, this is **NOT** valid...

X = "Line One _
Line Two"

Rather, you have to split the text constant in two two sub-strings and use
the line continuation sequence with one of the ampersands
(concatenationation symbol), like this...

X = "Line One " & _
"Line Two"

By the way, I meant to mention in my last post... you should use the
ampersand (&) to concatenate text together rather than the plus sign (+)...
there are occasions when concatenating Variants that you can get results you
were not expecting.


One last thing rick..... I would like to delete all information in the
spreadsheet that is there now and start completely over. But when I go to
save it an error message occurs and says something to the effect of " file
may contain features that are not compatible with CSV. Do you want to keep
the workbook in this format?"

I think its trying to tell me that I'm trying to save a .csv file as a
normal excel worksheet?


I'm not sure what to tell you on this as I don't work with CSV files myself.
Hopefully someone with more experience with CSV files will come along and
help out.

Rick