I have run into an issue. Originally the following code worked for what I was intending, however when multiple files were involved the code did not work.
Does anyone know how to open all files in the current folder the workbook is in that end in the same .pdf file extension?
Current code below;
Private Sub Workbook_Open()
Dim strFileName As String
Dim strFileExists As String
Dim sPath As String
sPath = Application.ActiveWorkbook.Path
strFileName = Dir$(sPath & "\*.pdf")
strFileExists = Dir(strFileName)
If strFileExists = "" Then
ThisWorkbook.FollowHyperlink Dir$(sPath & "\*.pdf")
Else
End If
End Sub
Does anyone know how to open all files in the current folder the workbook is in that end in the same .pdf file extension?
Current code below;
Private Sub Workbook_Open()
Dim strFileName As String
Dim strFileExists As String
Dim sPath As String
sPath = Application.ActiveWorkbook.Path
strFileName = Dir$(sPath & "\*.pdf")
strFileExists = Dir(strFileName)
If strFileExists = "" Then
ThisWorkbook.FollowHyperlink Dir$(sPath & "\*.pdf")
Else
End If
End Sub