Printing documents via a listbox and hyperlinks

D

davidarmstrong

Hello all,
I'm wondering if you could help me, I'm fairly new at VBA scripting
and excel in the whole but I need some help with something I'm trying
to produce.

I have 2 columns within an excel spreadsheet, Column B Contains the
filename and a hyperlink to the file, Column C contains the Pagesize.
What I'm trying to perform is for excel to go down the list and place
them into a listbox, you multi select the items you want then hit a
print button at the bottom, this opens up the hyperlinked document
and prints it off.

My current code is a bit sparse at the moment being:

Sub PrintFileList()
Dim URL As String
Dim hlnk As Hyperlink
Dim RwSrc As String



RwSrc = Sheet1.Name & "!" & Sheet1.Range _
("B2", Sheet1.Range("C65536").End(xlUp)).Address

With UserForm1.ListBoxFiles
..RowSource = vbNullString
..ColumnCount = -1
..MultiSelect = fmMultiSelectExtended
..RowSource = RwSrc

End With

End Sub


This pulls the columns into the form for me need help getting the
hpyerlinks in and working with it. I know there are most likely
easier ways to do this, but this will need to be replicated over a
large number of drawing registers and need something that can be added
into an existing sheet without messing around with the sheet contents
itself. oh and the files are mainly dwg/dwf/pdf's
 
A

ArmsteR

Is there any way to work with the hyperlinks in a listbox???? :( this
is doing my head in! !lol
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top