If I build in a break point, or a Application.Wait (Now + TimeValue("0:00:07")), then everything creates just fine...... but why would I need to do this in order for it to save?
Note 1 If i change that timer to 6 seconds... i get the error. 7 seconds is literally the lowest amount of time.
Note 2 The ONLY time this happens is when I am saving to a folder that would sync through One Drive. if I save it to a local folder on the computer that is not synced, then I can remove the timer.
Im confused. help!
Join Date
12-29-2011
Location
Duncansville, PA USA
MS-Off Ver
Excel 7/10/13/16/365 (PC ver 2310)
Posts
53,000
Welcome to the forum.
We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.
Please see
Forum Rule #3
about cross-posting and adjust accordingly. Read
this
to understand why we (and other sites like us) consider this to be important.
(
Note:
this requirement is not optional. No help to be offered until you provide a link or, for members with fewer than 10 posts, a comment telling us where else you have posted this query.)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
So sorry about that. I had posted here when more than 24 hours had gone by on a different forum without a reply.
Link to other post is
https://www.mrexcel.com/board/thread.../#post-5921614
This is still a problem that I am having, and not quite understanding why it exists.
The code for the section of code that creates the new worksheets / manipulates data is below. If I save to a local folder on my computer (say c:\test) it works perfectly and finishes within seconds.
If I select the folder for it to save to as one that is shared through onedrive / sharepoint then I get a "Run-time error '1004': Method 'SaveAs' of object'_Workbook' failed" error message.
Is there any way around this without having the stop in the code?
[SOLVED]
run into 1004 error "method 'saveas' of object '_workbook' failed" when saving wb copy
By tadaw in forum Excel Programming / VBA / Macros
Replies:
8
Last Post:
03-10-2017,
06:18 AM