+ Reply to Thread
Results 1 to 2 of 2

store sheets listed in listbox in array

  1. #1
    Orhan
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1