View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Diffus Diffus is offline
external usenet poster
 
Posts: 4
Default Reading variable list of cells into array

Sorry, I didn't include this in my question, but I want all sheets to
print at one time (to a PDF file). If I select each sheet and print
it individually, I'm going to have 30+ files, when I want one. I
figured reading the sheet names into an array would be the best way to
accomplish that, so that's why I phrased the question in those terms.
I guess I'm back to the original question.

On Sep 28, 11:14*am, ShaneDevenshire
wrote:
Hi,

Don't think you need to use the array:

Sub PrintSheets()
* * Dim cell As Range
* * Dim mySheet As String
* * Range([A4], [A4].End(xlDown)).Select
* * For Each cell In Selection
* * * * mySheet = cell
* * * * Sheets(mySheet).Activate
* * * * ActiveWindow.SelectedSheets.PrintOut
* * Next cell
End Sub

--
Thanks,
Shane Devenshire