Hi @Heung-Jae Lee ,
Welcome to Q&A forum~
But tag "office-excel-itpro" focuses on general issue of Excel client, as your issue is related to VBA code, to better help you, I would add the related tag "office-vba-dev". Thanks for your understanding.
I searched the similar threads, one is "Dir (myPathName & myExtension)" online, Dir function of VBA is not applicable to files on OneDrive Cloud such as files with "https:/ paths", but to files on local files.
(Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.)
Another one is "'Dir' to check existence of file in OneDrive", that try to use other fucntions, such as GetAbsolutePath Function in the FileSystemObject.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.