Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default store sheets listed in listbox in array

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



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
Store array ??? piero Excel Worksheet Functions 4 September 16th 09 04:39 PM
CODE 2 SELECT SHEETS LISTED IN A RANGE Faraz A. Qureshi Excel Discussion (Misc queries) 1 July 30th 09 07:31 AM
sum values from the listed sheets [email protected] Excel Worksheet Functions 9 October 15th 07 03:02 PM
Find values not listed in two sheets Mary[_2_] Excel Discussion (Misc queries) 2 April 13th 07 10:28 PM
Listbox - Store values tjh Excel Programming 1 September 17th 05 12:37 AM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"