Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Adding string to PrintOut?

At the end of my (XL2007) macro code, I have
wks1.Range("BA" & rwSt - 1 & ":BG" & rwEnd + 11).PrintOut

During the macro execution, I build a multi-line text string (multi-
lined by virtue of several vbCrLf), and show it to the user via
MsgBox.

How can I add the multi-line text string to my PrintOut?
Preferably on a separate page?

Ed
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default Adding string to PrintOut?

Dim NewWks as worksheet
....

Set NewWks = worksheets.add

with newwks
with .range("A1")
.wrapText = True
.value = myString 'whatever your variable is
'any more formatting you want -- widen the column, increase the rowheight??
.printout 'preview:=true 'for testing
end with
application.displayalerts = false
.delete
application.displayalerts = true
end with



On 09/01/2010 18:32, Ed from AZ wrote:
At the end of my (XL2007) macro code, I have
wks1.Range("BA"& rwSt - 1& ":BG"& rwEnd + 11).PrintOut

During the macro execution, I build a multi-line text string (multi-
lined by virtue of several vbCrLf), and show it to the user via
MsgBox.

How can I add the multi-line text string to my PrintOut?
Preferably on a separate page?

Ed


--
Dave Peterson
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
adding a cell in a text string Seemore Excel Programming 8 August 11th 09 05:48 PM
adding a string of data to an array R Tanner Excel Programming 2 September 29th 08 10:38 PM
Adding additional string vs. look up table Carlo Excel Worksheet Functions 0 April 1st 08 12:22 PM
Adding text string to cells Ray W. New Users to Excel 2 March 28th 08 02:33 PM
Adding Text to a String Gene Haines Excel Discussion (Misc queries) 1 November 29th 06 05:34 AM


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