Hi,
Im trying to get the user to specify which drive they have a filepath mapped to in order to open and manipulate an excel spreadsheet but I can't get it right, any ideas where the below code is wrong?
sDrive = InputBox("What drive letter have you mapped to?")
sDrive = sDrive & ":"
'Open downloaded file
ChDir "sDrive\test folder\2021"
Workbooks.OpenText Filename:="sDrive\test folder\2021"
Im trying to get the user to specify which drive they have a filepath mapped to in order to open and manipulate an excel spreadsheet but I can't get it right, any ideas where the below code is wrong?
sDrive = InputBox("What drive letter have you mapped to?")
sDrive = sDrive & ":"
'Open downloaded file
ChDir "sDrive\test folder\2021"
Workbooks.OpenText Filename:="sDrive\test folder\2021"