how to disassociate vba code from onedrive?

Stephen Thompson 0 Reputation points
2026-09-14T11:38:13.3866667+00:00

modle1 attempts to: ChDir "C:\Users\sthom\OneDrive\Wordle." i don't have a onedrive account. this code, which i did not write, causes my vba code to hang up while fixing errors in my code. to overcome this hang up i need to save and reload the file.

Developer technologies | Visual Basic for Applications
0 comments No comments

2 answers

Sort by: Most helpful
  1. Damien Pham (WICLOUD CORPORATION) 2,215 Reputation points Microsoft External Staff Moderator
    2026-09-15T03:02:22.78+00:00

    Hello @Stephen Thompson ,

    Thank you for sharing the details. Based on the code shown, this does not appear to be an association between VBA and OneDrive. The macro contains a hard-coded OneDrive folder path:

    ChDir "C:\Users\sthom\OneDrive\Wordle"

    According to Microsoft’s ChDir statement documentation, ChDir changes the current directory or folder to the path specified in the statement.

    Please open the Visual Basic Editor and locate this ChDir line. If the macro does not require a specific working folder, you can remove or comment out the line. Otherwise, replace the OneDrive path with the path of an existing local folder on your computer.

    I hope this helps clarify why the macro is referencing OneDrive. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guidance or provide feedback.     

    Thank you.     

    Was this answer helpful?


  2. Barry Schwarz 6,111 Reputation points
    2026-09-14T17:47:27.9533333+00:00

    Change the statement to

    ChDir "C:\Users\sthom\Documents"
    

    or to any other folder you have access to.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.