Thread
:
Selecting mulitple worksheets to Print (using VBA)
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Selecting mulitple worksheets to Print (using VBA)
try one of these
Sub printsheets()
myarray = Array("sheet1", "sheet3")
For Each sh In Sheets(myarray)
sh.PrintPreview
Next
End Sub
Sub ps()
Sheets(Array("sheet1", "sheet3")).PrintPreview
End Sub
--
Don Guillett
SalesAid Software
"Adele" wrote in message
...
I need to select a user defined list of worksheets all at once using VBA.
I have a string variable containing a list of selected worksheets.
for example: mystring = "Sheet1,"&"Sheet2,"&"Sheet3"
Is it possible to pass the variable mystring as an argument in the
following
function:
Sheets(Array(mystring)).Select without it generating an error message ?
Or is there another way of selecting worksheets at once using VBA ?
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]