PDA

View Full Version : Save Document's most recent version



infinity
03-25-2019, 03:35 PM
Hi all VBaxers,

I was wondering if there is something I can do with my Excel VBA code that would always save the files most recent version. I have a file with code that I use on my laptop (actually several others use their own version of the same file also). The problem I am having is that if I take my laptop into my car and my network connection is lost it won't let me save the file unless I change the name because it says it is Read Only. I want it to always save the document with the same name and with the most recent changes to it. This file changes constantly and it works very well but this is very frustrating. Thank you much!

Aussiebear
03-25-2019, 05:06 PM
This came up as a thread some time ago with xluser2007 http://www.vbaexpress.com/forum/showthread.php?23818-Solved-Removing-read-only-status-before-opening-the-workbook

The solution is to change the read only status before you open the workbook

infinity
03-26-2019, 07:14 AM
I don't open it as Read Only, I open it when I am connected to my network through a VPN but when the network connection is lost because I move my computer to my car and have to connect to my WiFi in my car, it thinks it was opened as Read Only. I want it to always over-write the old document every time I run the code UNLESS it has been opened specifically as Read-Only. Thank you.

Aussiebear
03-27-2019, 11:26 AM
Did you look at the solution before you responded?