I have an Excel file that updates my Access database, however I realised the Access database regularly changes location so I would like the file location to be inputted by an input box and this used. I've tried case select but this hasn't been successful, here's what I have so far:
d = InputBox(Prompt:="Enter file path", Title:="Please enter the file path", Default:="File Location")
Select Case StrPtr(d)
Case 0
Exit Sub
Case Else
Dim cnn As Object
Dim lngRow As Long
Dim lngID As Long, LR As Long, Upd As Long
Dim strID As String
LR = ThisWorkbook.Worksheets("Update").Range("BN" & Rows.Count).End(xlUp).Row
Upd = LR - 1
lngRow = 2
Set cnn = CreateObject("ADODB.Connection")
cnn.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=d"