store sheets listed in listbox in array
Dim ary
Dim j As Long, i As Long
ReDim ary(j)
With Me.ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
ReDim Preserve ary(j)
ary(j) = .List(i)
j = j + 1
End If
Next i
End With
I'll leave the PDF bit to you
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Orhan" wrote in message
ups.com...
Hi,
What I want is to store all sheets listed in ListBox2
(MultiSelectSingle) to an array and then print them to one PDF file.
My ListBox2 is in a UserForm and belongs to an .xla menu addin.
As PDF printer I use PDF reDirect Pro Batch Printer.
Thanks
|