+ Reply to Thread
Results 1 to 9 of 9

VBA to upload active worksheet in Google Drive

  1. #1
    Registered User
    Join Date
    02-21-2018
    Location
    Germany
    MS-Off Ver
    Windows 7
    Posts
    5

    VBA to upload active worksheet in Google Drive

    Hallo together,

    im totally beginner in VBA. I create a button in my worksheet. Now i would like to write a macro, that after click on this button will upload my worksheet into Google Drive. Can somebody help me please?

    Best regards,
    Krisiace

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,885

    Re: VBA to upload active worksheet in Google Drive

    Look at this link https://stackoverflow.com/questions/...with-excel-vba
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-21-2018
    Location
    Germany
    MS-Off Ver
    Windows 7
    Posts
    5

    Re: VBA to upload active worksheet in Google Drive

    Thank you for your answer.
    I have already saw this code and tried to do this in that way, but unfortunately it didn't work.
    Maybe someone has other way how to solve this issue.
    I would really appreciate any help!!!!!!!

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: VBA to upload active worksheet in Google Drive

    if im correct if the excel file is located inside the google drive(now backup and sync program) folder
    or any folder you chose to back-up in the backup and sync program
    if you make any changes to the excel file it will automatically sync to your google drive

  5. #5
    Registered User
    Join Date
    02-21-2018
    Location
    Germany
    MS-Off Ver
    Windows 7
    Posts
    5

    Re: VBA to upload active worksheet in Google Drive

    Thank you for your answer.
    im working with Excel 2007 and im not sure if there such folder exist.
    But nevertheless i dont want that my file autoticly changes. I need to have upload for every update of the file in google drive.
    Any ideas?

  6. #6
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: VBA to upload active worksheet in Google Drive

    the program is now called backup and sync it used to be google drive
    if you install it on your windows pc
    and then signing in your account
    in the preferences/settings of the program
    you can choose which folder to continuously sync to your actual google drive
    put your excel file in that folder
    while inside the folder
    if you make any changes/update to that excel file
    it will automatically sync to your google drive

  7. #7
    Registered User
    Join Date
    02-21-2018
    Location
    Germany
    MS-Off Ver
    Windows 7
    Posts
    5

    Re: VBA to upload active worksheet in Google Drive

    in my company i cannot install this program.
    I should make one button after click on it the active excel file will be uploaded to google drive. This excel file will be use all my colleagues. I should work with rest api and i have no idea how to code it.

  8. #8
    Registered User
    Join Date
    02-21-2018
    Location
    Germany
    MS-Off Ver
    Windows 7
    Posts
    5

    Re: VBA to upload active worksheet in Google Drive

    Option Explicit
    Public Sub Upload()
    'Define http client
    'Dim xmlhttp As Object
    'Set xmlhttp = CreateObject("MSXML2.serverXMLHTTP")
    Dim xmlhttp As New MSXML2.xmlhttp, myurl As String
    myurl = "myurl"
    'make request
    xmlhttp.Open "POST", myurl, False
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlhttp.send "name =name&email=mail"
    MsgBox (xmlhttp.responseText)
    End Sub

    this is my code and as result when i run this code i become the html code.
    can please somebody help me what should i do next????!!!!
    Attached Images Attached Images

  9. #9
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: VBA to upload active worksheet in Google Drive

    does the excel file contains complex data?
    if not, why not use "google sheets"
    im guessing your pc has internet connection
    you can just use your internet browser to use "google sheets"
    you can share the file to your colleagues
    the file will actually be saved into your google drive

    sadly i have no experience in coding

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Upload file to google drive
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2019, 01:21 PM
  2. Upload text file in google drive
    By zaku2s in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2017, 01:42 AM
  3. Upload/Download file to/from Google Drive
    By TudyBTH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2016, 07:22 PM
  4. Upload .csv file to google drive
    By paladin776 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2016, 03:10 AM
  5. Upload File to a mapped drive
    By zhaype in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-07-2013, 10:50 PM
  6. Is it possible to run a macro to upload Access DB to a shared drive?
    By JasonPsychoSO242 in forum Access Tables & Databases
    Replies: 4
    Last Post: 12-28-2012, 02:58 PM
  7. [SOLVED] can we upload files in google group
    By sajay in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-07-2005, 03:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1