m_court15
06-28-2011, 01:46 PM
ok, now I am trying to create an open dialog box that you can select a pdf file and open it.
I am trying to have the open box pop up when the form is started, then the user is suppose to select the pdf file they want to view. Then, the file should populate the acroPDF1 box.
Private Sub UserForm_Initialize()
Dim As FileDialog
Set dlgopen = Application.FileDialog(msoFileDialogOpen)
Application.FileDialog(msoFileDialogOpen).Filters.Add "PDF", "*.pdf"
With dlgopen
.InitialFileName = "c:\users\matt courtright\desktop\test userform\"
.AllowMultiSelect = False
.Show
End With
AcroPDF1.LoadFile "C:\users\matt courtright\desktop\test userform\p10298.pdf"
End Sub
I am trying to combine these two sets of code somehow. Hope I explained it enough; it might need more clarification.
Thanks,
Matt
I am trying to have the open box pop up when the form is started, then the user is suppose to select the pdf file they want to view. Then, the file should populate the acroPDF1 box.
Private Sub UserForm_Initialize()
Dim As FileDialog
Set dlgopen = Application.FileDialog(msoFileDialogOpen)
Application.FileDialog(msoFileDialogOpen).Filters.Add "PDF", "*.pdf"
With dlgopen
.InitialFileName = "c:\users\matt courtright\desktop\test userform\"
.AllowMultiSelect = False
.Show
End With
AcroPDF1.LoadFile "C:\users\matt courtright\desktop\test userform\p10298.pdf"
End Sub
I am trying to combine these two sets of code somehow. Hope I explained it enough; it might need more clarification.
Thanks,
Matt