I'm trying to get this code to open a file for me:
Sub openfile()
Dim A As sting
Dim B As String
A = Application.InputBox("type value of A here:")
B = Application.InputBox("type value of B here:")
Workbooks.Open Filename:= _
"D:\Users\" & A & "\Documents\" & B & ".xlsx"
End Sub
It's not working and I'm not sure why. Can anyone help me?
Thanks,
Greg
Sub openfile()
Dim A As sting
Dim B As String
A = Application.InputBox("type value of A here:")
B = Application.InputBox("type value of B here:")
Workbooks.Open Filename:= _
"D:\Users\" & A & "\Documents\" & B & ".xlsx"
End Sub
It's not working and I'm not sure why. Can anyone help me?
Thanks,
Greg