I'm trying to use a code to open a saved workbook. In a worksheet (Drop Page) A1 is the Month, A2 is the Day, and A3 is the year. When I change these values it is to change the name of the workbook I'm trying to open. For some reason it can't find the saved workbook. I can open the workbook manually with no issues. This is the popup I'm getting. Any help would be GREAT.
Sub FindSheet_and_open()
Dim wb As Workbook
Dim ws As Worksheet
Dim MainPath As String
Dim Month As String
Dim Day As String
Dim Year As String
Dim FullPath As String
Set wb = ThisWorkbook
Set ws = wb.Worksheets("Drop Sheet")
MainPth = "R:\Production\Production Reports\"
Month = ws.Range("B1")
Day = ws.Range("B2")
Year = ws.Range("B3")
FullPath = MainPath & Month & "-" & Day & "-" & Year & ".xlsm"
Workbooks.Open (FullPath)
End Sub
Sub FindSheet_and_open()
Dim wb As Workbook
Dim ws As Worksheet
Dim MainPath As String
Dim Month As String
Dim Day As String
Dim Year As String
Dim FullPath As String
Set wb = ThisWorkbook
Set ws = wb.Worksheets("Drop Sheet")
MainPth = "R:\Production\Production Reports\"
Month = ws.Range("B1")
Day = ws.Range("B2")
Year = ws.Range("B3")
FullPath = MainPath & Month & "-" & Day & "-" & Year & ".xlsm"
Workbooks.Open (FullPath)
End Sub