#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help Please

Attached below is part of the code when you click a
command button. This puts the values of the cells into a
word document. My question is I want these values on
different lines but by default it places them all on the
same line. I hope this makes sense.. Can some one help?
Thanks in advance.

Dim mywdRange As Word.Range
Set mywdRange = myDoc.Words(1)
With mywdRange
.Text = Range("G6") & _
Range("G7") & _
Range("G8")
End With
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Help Please

By placing the '&' between each range, you are telling the
routine to put each range together on the same line.

You will probably need to specify each range to be pasted
separately, ie

..text1=Range("G6")
..text2=range("G7")
..text3=range("G8")

Hope this helps

DavidC
-----Original Message-----
Attached below is part of the code when you click a
command button. This puts the values of the cells into a
word document. My question is I want these values on
different lines but by default it places them all on the
same line. I hope this makes sense.. Can some one help?
Thanks in advance.

Dim mywdRange As Word.Range
Set mywdRange = myDoc.Words(1)
With mywdRange
.Text = Range("G6") & _
Range("G7") & _
Range("G8")
End With
.

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



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