Hi.
I have a problem.
I have a listbox, and a acroPDF, and i would like it to when i press a filename(.pdf) in the listbox, that it previews the PDF file in the acroPDF.
For the listbox, i have a browse button, that makes you select a folder:
Then when i select that folder, all the pdf files within that folder shows, and when i click the desired pdf file, i need to make it show in the acroPDF.
If i then use :
it will then show that file correctly, but only show that spesific file.
How do i make it show the file that i am actually selecting, from the listbox ? (recap: i browse to a spesific folder which contains the pfd files i want to show, then press that file from the listbox, then i want that file to be showned in the acroPDF)
Thanks in advance.
I have a problem.
I have a listbox, and a acroPDF, and i would like it to when i press a filename(.pdf) in the listbox, that it previews the PDF file in the acroPDF.
For the listbox, i have a browse button, that makes you select a folder:
Code:
Private Sub select_Image_1_Click()
Dim MyFolder As String
Dim MyFile As String
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show = -1 Then
ListBox1.Clear
TextBox1.Text = .SelectedItems(1)
MyFile = Dir(.SelectedItems(1) & "\*.pdf")
Do While MyFile <> ""
ListBox1.AddItem MyFile
MyFile = Dir
Loop
End If
End With
End Sub
Then when i select that folder, all the pdf files within that folder shows, and when i click the desired pdf file, i need to make it show in the acroPDF.
If i then use :
Code:
Me.AcroPDF1.LoadFile "C:\04.pfd"
How do i make it show the file that i am actually selecting, from the listbox ? (recap: i browse to a spesific folder which contains the pfd files i want to show, then press that file from the listbox, then i want that file to be showned in the acroPDF)
Thanks in advance.
Last edited by a moderator: