Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default OK, I simplified my problem a bit, smart people sound off!!!!!

Guys,

3rd post on this now, and I have narrowed my problem down to this:

Function test () as String

test = "line1" & vbLf & "line2"

End


This function shows this in my Excel cell...

line1
line2

If I cut and paste it into notepad, it shows this...

"line1
line2"

I need to get rid of those quotation marks. If I take the vbLf out, i get
line1line2 and when I cut and paste there are NO quotation marks, so I know
it has to do with the fact that I put in the vbLf.

Is there ANY way I can still have my text formatted with carriage returns
when I cut and paste into Notepad WITHOUT getting those annoying quotation
marks?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default OK, I simplified my problem a bit, smart people sound off!!!!!

Well, I'm not sure how "smart" this is... But, I got the same results you
mention in your post when I attempt to past into Notepad. I couldn't really
find a way around it.

So, if I can't fix one side... Let's try the other.

Is there any reason you have to paste into NotePad?

What I did is simply use WordPad and PasteSpecial and chose Rich Text and I
seem to get the format you are looking for.

Just a thought...


"rfusee" wrote:

Guys,

3rd post on this now, and I have narrowed my problem down to this:

Function test () as String

test = "line1" & vbLf & "line2"

End


This function shows this in my Excel cell...

line1
line2

If I cut and paste it into notepad, it shows this...

"line1
line2"

I need to get rid of those quotation marks. If I take the vbLf out, i get
line1line2 and when I cut and paste there are NO quotation marks, so I know
it has to do with the fact that I put in the vbLf.

Is there ANY way I can still have my text formatted with carriage returns
when I cut and paste into Notepad WITHOUT getting those annoying quotation
marks?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default OK, I simplified my problem a bit, smart people sound off!!!!!

On 20 Sep, 16:30, rfusee wrote:
Guys,

3rd post on this now, and I have narrowed my problem down to this:

Function test () as String

test = "line1" & vbLf & "line2"

End

This function shows this in my Excel cell...

line1
line2

If I cut and paste it into notepad, it shows this...

"line1
line2"

I need to get rid of those quotation marks. If I take the vbLf out, i get
line1line2 and when I cut and paste there are NO quotation marks, so I know
it has to do with the fact that I put in the vbLf.

Is there ANY way I can still have my text formatted with carriage returns
when I cut and paste into Notepad WITHOUT getting those annoying quotation
marks?


Hi,

What about outputting directly to the text file rather than cutting
and pasting?

Function test() As String
Open "C:\Test.txt" For Output As #1
Print #1, "line1"
Print #1, "line2"
Close #1
End Function

This will then put in your text file:
Line1
Line2

James

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default OK, I simplified my problem a bit, smart people sound off!!!!!

I found the real cause of the problem and why it is happening.

Forget the formula. If you type line1 and the Alt-enter (to get two lines)
and then type Line2

Line1 (Alt-enter)
Line2

Now copy these two lines into Notepade you get the double quotes. Notepad
is trying to keep the two rows of data together. Don't know the solution.

" wrote:

On 20 Sep, 16:30, rfusee wrote:
Guys,

3rd post on this now, and I have narrowed my problem down to this:

Function test () as String

test = "line1" & vbLf & "line2"

End

This function shows this in my Excel cell...

line1
line2

If I cut and paste it into notepad, it shows this...

"line1
line2"

I need to get rid of those quotation marks. If I take the vbLf out, i get
line1line2 and when I cut and paste there are NO quotation marks, so I know
it has to do with the fact that I put in the vbLf.

Is there ANY way I can still have my text formatted with carriage returns
when I cut and paste into Notepad WITHOUT getting those annoying quotation
marks?


Hi,

What about outputting directly to the text file rather than cutting
and pasting?

Function test() As String
Open "C:\Test.txt" For Output As #1
Print #1, "line1"
Print #1, "line2"
Close #1
End Function

This will then put in your text file:
Line1
Line2

James


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default OK, I simplified my problem a bit, smart people sound off!!!!!

Yep...it's not just notepad, Access does this also (which is where I'm really
pasting to). Is there a way when I paste into Access that I can paste into a
formatted text box or something?

"Joel" wrote:

I found the real cause of the problem and why it is happening.

Forget the formula. If you type line1 and the Alt-enter (to get two lines)
and then type Line2

Line1 (Alt-enter)
Line2

Now copy these two lines into Notepade you get the double quotes. Notepad
is trying to keep the two rows of data together. Don't know the solution.

" wrote:

On 20 Sep, 16:30, rfusee wrote:
Guys,

3rd post on this now, and I have narrowed my problem down to this:

Function test () as String

test = "line1" & vbLf & "line2"

End

This function shows this in my Excel cell...

line1
line2

If I cut and paste it into notepad, it shows this...

"line1
line2"

I need to get rid of those quotation marks. If I take the vbLf out, i get
line1line2 and when I cut and paste there are NO quotation marks, so I know
it has to do with the fact that I put in the vbLf.

Is there ANY way I can still have my text formatted with carriage returns
when I cut and paste into Notepad WITHOUT getting those annoying quotation
marks?


Hi,

What about outputting directly to the text file rather than cutting
and pasting?

Function test() As String
Open "C:\Test.txt" For Output As #1
Print #1, "line1"
Print #1, "line2"
Close #1
End Function

This will then put in your text file:
Line1
Line2

James




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default OK, I simplified my problem a bit, smart people sound off!!!!!

unfortunately that won't help me in this scenario. Ultimately what I'm
really doing is pasting this text into an Access text box which is part of a
much larger template which auto-generates contracts for me.

" wrote:

On 20 Sep, 16:30, rfusee wrote:
Guys,

3rd post on this now, and I have narrowed my problem down to this:

Function test () as String

test = "line1" & vbLf & "line2"

End

This function shows this in my Excel cell...

line1
line2

If I cut and paste it into notepad, it shows this...

"line1
line2"

I need to get rid of those quotation marks. If I take the vbLf out, i get
line1line2 and when I cut and paste there are NO quotation marks, so I know
it has to do with the fact that I put in the vbLf.

Is there ANY way I can still have my text formatted with carriage returns
when I cut and paste into Notepad WITHOUT getting those annoying quotation
marks?


Hi,

What about outputting directly to the text file rather than cutting
and pasting?

Function test() As String
Open "C:\Test.txt" For Output As #1
Print #1, "line1"
Print #1, "line2"
Close #1
End Function

This will then put in your text file:
Line1
Line2

James


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default OK, I simplified my problem a bit, smart people sound off!!!!!

why are you cutting and pasting into Access. why don't you open access witth
excel and write the data directly. or have a macro in Access that opens the
excel spreadsheet and reads the data.

This is a discussion group for programming, not for manual cut and paste.
Lets do some real programming.

"rfusee" wrote:

unfortunately that won't help me in this scenario. Ultimately what I'm
really doing is pasting this text into an Access text box which is part of a
much larger template which auto-generates contracts for me.

" wrote:

On 20 Sep, 16:30, rfusee wrote:
Guys,

3rd post on this now, and I have narrowed my problem down to this:

Function test () as String

test = "line1" & vbLf & "line2"

End

This function shows this in my Excel cell...

line1
line2

If I cut and paste it into notepad, it shows this...

"line1
line2"

I need to get rid of those quotation marks. If I take the vbLf out, i get
line1line2 and when I cut and paste there are NO quotation marks, so I know
it has to do with the fact that I put in the vbLf.

Is there ANY way I can still have my text formatted with carriage returns
when I cut and paste into Notepad WITHOUT getting those annoying quotation
marks?


Hi,

What about outputting directly to the text file rather than cutting
and pasting?

Function test() As String
Open "C:\Test.txt" For Output As #1
Print #1, "line1"
Print #1, "line2"
Close #1
End Function

This will then put in your text file:
Line1
Line2

James


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
Need help by smart people!!! rfusee Excel Programming 12 September 21st 07 12:37 AM
Write Line problem when writing simplified chinese characters KI LEE Excel Programming 7 August 17th 05 05:41 AM
Problem with playing sound code EMoe[_39_] Excel Programming 3 July 6th 05 01:30 AM
Can this be simplified? Niko Excel Programming 8 June 11th 05 05:02 PM
Excel sound alert problem ___Zoom[_2_] Excel Programming 14 January 5th 04 09:36 AM


All times are GMT +1. The time now is 01:43 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"