I'm trying to open specific files from network drives, but I can't use specific addresses for the files... I'll explain, but here is the code I'm using:
if checkfile("Counterparty Report.xls") then
else
workbooks.open filename:="Counterparty Report.xls"
end if
This works when the the file I'm trying to open and the file that this is being run in are in the same folder on my computer. But when I try to do the same thing on a mapped network drive, this will not work. I do not want to put in specific address for the files because the files will be moved around, but remain in the same folder. So I need this to be able to work as long as they are in the same folder.
Am I doing something wrong, is there a better way to do this, or is this even possible?
Thanks.
if checkfile("Counterparty Report.xls") then
else
workbooks.open filename:="Counterparty Report.xls"
end if
This works when the the file I'm trying to open and the file that this is being run in are in the same folder on my computer. But when I try to do the same thing on a mapped network drive, this will not work. I do not want to put in specific address for the files because the files will be moved around, but remain in the same folder. So I need this to be able to work as long as they are in the same folder.
Am I doing something wrong, is there a better way to do this, or is this even possible?
Thanks.