Solved How can i upload or download a file from Google Drive In VBA ?

VBANewBie :)

Member
Local time
Today, 01:29
Joined
Apr 14, 2021
Messages
88
Hi guys , As the title i need to download and upload files directly to google drive with vba code without using synchronize folder as it will be used on different PCs .
Thanks in advance
 
Google drive has a mapped letter?
 
Hello again , I got this example and got all the needed credentials but i get this error when it tries to connect to google account , can anyone help ?
1.png


2.png


these are current references , Any missing ?
3.png

Thanks guys
 

Attachments

I cannot even open the DB?

Tried again and did manage to get it open. You did not say what to use to get the error :(

I tried opening FrmGdrive and got
1644511221336.png
 
Last edited:
No it tells me it will lose all the modules as the VBA project is corrupt or to that effect.

Get it compiled first then upload again.
 
Looking at your Tools >> References exhibit, I suspect part of the problem is that you don't have a Google library checked. I would think that a method as specific as .LogOnGoogle user, password would have to be part of a vendor-specific (i.e. Google) references library, which means you would have to check it in your references list. I would be astounded to find that a .LogOnGoogle method was available from any of the "standard" Access libraries.
 
Looking at the sample file, .LogOnGoogle is a method of the gAuth2 class. Maybe the error is actually within that method. Just a thought...
 
you don't have a Google library checked
Thanks for your reply , I searched my references and didn’t find any google and also the person who shared the example didn’t mention any special library .
I don’t know what to do :(
 
You can create all this code, yet cannot carry out simple debugging? :(
Ah wait, you didn't create it, just copied it?, but still had to modify to suit, surely?

Your error is here as shown below in LogOnGoogle

You have On Error Goto ErrorHandler in some subs/functions which just exits the sub/function? :(

How are you meant to determine where any error is?


1644514718587.png
 
Last edited:
After further research, I found this article that names a file you could try to find. It was for another environment, but it seems similar.


Otherwise, since you are obviously a cloud-service customer you should be able to call their help desk and ask for the name of (and a source of) the required .DLL file that would satisfy those references.
 
The code just grinds my laptop to a halt.

Edge opens instead of IE

Even when I know where to put the breakpoint at?

Puzzled as to why I cannot see the objects like olExplorer?

This is beyond my pay grade :(
 
Ah wait, you didn't create it, just copied it?, but still had to modify to suit, surely?
I didn’t mention that i’m an expert or i did write this code , And sure i did my best trying to figure out what’s missing and i suspected it was a missing reference and it probably is .
thanks for your help
 

Users who are viewing this thread

Back
Top Bottom