Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
adding a cell in a text string | Excel Programming | |||
adding a string of data to an array | Excel Programming | |||
Adding additional string vs. look up table | Excel Worksheet Functions | |||
Adding text string to cells | New Users to Excel | |||
Adding Text to a String | Excel Discussion (Misc queries) |