Couldn't find the local location of your OneDrive Issue - vba

Background
I use xlwings within Excel, I just had this message popping out stating that Xlwings was unable to find the location of my OneDrive; I followed the steps as stated on their troubleshooting section and was able to solve it partially.I realized that OneDrive needs to be unpaused (this mean synced) to be able to solve it
Problem
Is there a way to address this without OneDrive needed to be in sync? I create a lot of "temp" files for some middle-processes and I would like to sync the final result, not those that just get created and deleted afterwards. It is not an algorithm design/flaw, let us say for example I download temp files from the internet, then transform them/append them to a master file and lastly delete them (they only serve to get the data). For this matter I hit the "Pause Sync" temporarly until the process is done, but it seems XlWings pops out the message if OneDrive is paused.

Related

Why Google Colab thinks my file does not exist despite it being mounted from my Drive?

I made sure every single thing is correct with the related file names and their content addresses and so on yet I always get stuck upon executing the !sudo line command which should open and use a given file, it returns this error :
"Error: Cannot read file '/content/-p': No such file or directory"
As I have already said, the file does exist and is located in my Google Drive, I even copy pasted its specific path to make sure I put it right and yet the issue is still there, why? how can I solve it?
Thanks in advance for any help.
Two scenarios in my experience:
(1) It's the first time running the lines of code after mounting your google drive and for no apparent reason it runs for tens of minutes, produces not output, raises an error (e.g. "File does not exist"), and the session crashes; you repeat the exact same steps, then it works.
(2) There are thousands (or more) files within the folder that contains the file you're trying to read or write; when a google drive folder contains many files (i.e. thousands or more) it may crash for that reason.

FTP Server Download Returns blank files

We have a process in place built on Excel VBA that uploads a file to FTP Server. On the other side, our client downloads it. Very randomly, they complain that the file they received is blank (the file name is the same though). We then check at our end and see that the file that was uploaded was never blank. So here comes the problem: we're always arguing whether it was our error or theirs.
I figured that there might be a couple of reasons behind it but I have a few questions to ask before coming to conclusions:
If, say, the file was never uploaded (a possibility), what happens when the client runs a download process at their end? Can that download process generate a blank file with the same name as our output file? It sounds impossible to me but since the client is following up on this issue, I have to ask this silly question.
How does the mechanism work - what are the steps that happen on FTP server the moment my process completes uploading the file? I sometimes see that as soon as I upload the file, a 0kb file is created and then a second later (or less) the file with right size appears? Could it be possible that their process is running right before this actual file creation?
Thank you in advance for your help!

Check if Dropbox has synced

Before I look into this any further I just wondered if it's possible within VB.net to check if DropBox has synced?
Basically the program I have written uses DropBox to synchronize jobs to a Main computer which then ultimately process the zip file and deletes it. Once the job is processed a text file is re synced and the person who originally sent the job gets feedback as to its progress. All this works great. However, I would like to give an indication within the program itself so some of the less computer literate can see that DropBox has synced and they can safely turn off there laptops and head off home.
Has anybody any experience of this?
You could use the Dropbox API to do the upload/download instead, at which point you'd know exactly when things had happened.
See https://www.dropbox.com/developers for information about the API.

Prevent file being overwritten

Imagine there are 3 or more independent locations where a file can be modified. These locations communicate to each other through email or mail (direct flash drive restoration). Though there is a big room for flow - to make simultaneous editing to the file and screw up things, this client won't change too much. He rather call everyone that he is working on the last update or tell the other guys that he is waiting for third guy's last update. Anyway, at some point after several exchanges, due to one of participants unintentional error THE LAST VERSION of the file eventually gets mixed up. From this point everyone searches for the last version BY LOOKING THE CONTENT of the file.
This client wants to have a central location (he has actually, that is his PC's some location) and let everybody (including himself) copy any new or suspected new file to this location but prevent file's last version being copied. From this location he has to easily copy, send or open the file and work.
So, here is my concept (2 steps):
step 1: I made an ad to the main application where this file is created or edited. This ad prompts the user to give a version number to the file with every invoked save command from the editing application. In fact the file can be re-saved multiple times but not considered modified (file attributes creation, save etc. do not have great meaning here). This said the user can cancel my ad-in but have saved the file, not saving a new file version.
step 2: multiple solutions:
solution A: I'm thinking to have a folder/file watch and prevent the last version of the file being overwritten. As you know, FileSystemWatcher will fire the change/delete etc., events AFTER FACT so, I have to back copy overwritten file after the fact (w/ some tricks).
solution B: have a database to store all version of files and built-in some shell extension to extract/view files from the database. Move all copied/pasted files to the database (my program folder) and restore latest file in working folder after watcher fires change/delete event.
solution 3: find out built-in windows tools (API etc.) to greatly rely on it with some programming.
Any ideas?
Thanks in advance.

Changing the location of an existing VBA Reference from C:\Windows\system32\ to a shared drive

I've been trying for a while now to get a reference file to be loaded externally to no avail.
To be specific I am trying to load a "Microsoft Date and Time Picker Control 6.0(SP4)" which usually resides in C:\Windows\System32\MSCOMCT2.OCX
However some people that run a macro containing this element don't have that "MSCOMCT2.OCX" file on their PCs so I thought I will move the MSCOMCT2.OCX to a shared location and reference the code to use the shared one instead (so everyone will have access to it)
I tried doing that but when I was trying to load a reference with "Browse" from a different location it didn't load it - because I already had that in C:..
So I thought OK... I will remove the file from C:\ so I can only reference the shared file. - so I deleted it.
So I open the workbook again and look at references - I cant find "Microsotft Windows Common Controls-2.6.0(SP4)" - great!
And I proceed to add it manually with Browse from the shared drive.
When I do that however 2 references of "Microsotft Windows Common Controls-2.6.0(SP4)" are being added - 1 from C:\(which is not there) and 1 from the shared drive.
The one from C:\ is always automatically selected.
If I try to disable the one from C:\ and enable the one from the shared drive it automatically changes back to what it was when i press OK.
If I try to enable both - it says duplicate References and keeps only the one from C:\
So.. does anybody know how can I get rid of that C:\ reference from the list so it doesn't get loaded? Apparently deleting the files themselves did not work.
Ultimately my goal is to enable people without C:\Windows\System32\MSCOMCT2.OCX file to be able to use my Date Picker Tool.
Thanks a lot!
ActiveX control rereferences are always GUID-based. The VB IDE shows you the current location of the file as listed in the registry on your computer, as a courtesy, but it really doesn't matter what it says. The control will be loaded from wherever it was registered on the user's computer.
That's the key: the control must be registered on the user's computer.
I must strongly discourage you from doing what you're trying to do. You might be able to concoct a method by which you load the DLL from a network location, but it presents no advantage over doing the Right Thing(TM), and plenty of problems. The Right Thing is simply that if you need that control, you must distribute and register it with your application, just like everybody else does. And you really should install it in the recommended location for it (System32); not on the network.
Here's a quick example of what can go wrong: you provide your user with you app, and it works with the control on the network like you want it. Then the user installs another application that happens to need the same control. The app's installer sees that the control is already registered on the user's computer, so it doesn't try to add it again. Except that this particular app is intended to be used when the user is not connected to a network. Now you just broke someone else's program.
The VB/VBA architecture was never intended to support XCOPY deployment. I'm know it's a pain and that these extra steps are extremely inconvenient when you're just trying to deploy a "macro". Sadly, it's the nature of the beast. I'm sorry