VBA Code to Open Adobe File with Wildcards in String


New Member
Feb 15, 2017
HI there,
Here is my code:
Sub Open_CAReport()
Dim FANum As Variant
FANum = ActiveWorkbook.ActiveSheet.Range("B2").Value
Dim Analytics As String
Analytics = "X:\abt\ABTP\Programs\ABTP_Reports\ABTP_Analytics\@2018 Client Analytics_US"
Dim effmon As String
effmon = MonthName(month(Range("I2")), True)
Dim effnum As Variant
effnum = month(Range("I2"))

Dim AdobeApp As String
Dim AdobeFile As String
Dim StartAdobe As Long

AdobeApp = "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe"
AdobeFile = Analytics & effnum & " " & effmon & " 2018\*" & FANum & "*.pdf"
StartAdobe = Shell("" & AdobeApp & " " & AdobeFile & "", 1)
End Sub

I'm getting a "Run-time error '53': File not found" error and I think it may be because of the wildcards in the file name but I could be wrong.

Does anyone see anything wrong that would prevent the Adobe file from opening?

Thank you in advance for your help!!!!


Forum statistics

Latest member
Joaquin Phoenix

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...