+ Reply to Thread
Results 1 to 2 of 2

Trying to save a copy of a master excel on C: to Google G drive with a new name

  1. #1
    Registered User
    Join Date
    04-22-2021
    Location
    Chicago, IL
    MS-Off Ver
    Office 2019
    Posts
    2

    Question Trying to save a copy of a master excel on C: to Google G drive with a new name

    Hello,

    I am not fluent in VBA code, but I know a little. I am trying to make a macro that will save a master excel file in a different drive (G) and let the user plug in a new name. I have gotten very close, but it always saves it in my current (C) drive. It saves just fine in (G) if I wanted to use the same file name, but I want the user to put in a new one. I have tried using the * for the file name, but it doesn't like it.

    I have also used the ChDir command, but it evidently forgets when I try and save the file. Any help you can give is appreciated.

    See below:

    Please Login or Register  to view this content.
    (This won't open in G drive to save)

    I have also tried this:

    Please Login or Register  to view this content.

    I am not very familiar with the DIM commands, but I am wondering if that is what I need. Thank you for any help you can give.

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 04-22-2021 at 05:01 PM.

  2. #2
    Registered User
    Join Date
    04-22-2021
    Location
    Chicago, IL
    MS-Off Ver
    Office 2019
    Posts
    2

    Re: Trying to save a copy of a master excel on C: to Google G drive with a new name

    I have also tried this: It works great, but I want to replace the "test again" file name with one the user puts in.
    [/CODE]Sub Macro1()
    ' Macro1 Macro
    Range("C3:I3").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
    IgnorePrintAreas:=False
    ChDir "G:\My Drive\CURRENT WEEK"
    ActiveWorkbook.SaveAs Filename:="G:\My Drive\CURRENT WEEK\test again.xlsm", _
    FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
    End Sub[/Code]

+ 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. Google sheet: Help to attachment file from Google Drive and send email fill in Google Form
    By sbv1986 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 03-01-2021, 10:47 PM
  2. [SOLVED] Google sheets script to download file and save it to google drive folder and use it's data
    By western in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 5
    Last Post: 01-18-2021, 01:31 PM
  3. [SOLVED] Google sheets vba to download file and save it to google drive folder and use it's data
    By western in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2021, 08:48 AM
  4. [SOLVED] Create a new folder on Google Drive using Excel VBA Coding
    By waleed.slc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2018, 07:12 PM
  5. Using Excel w/in Google Drive on an iPad Air
    By jmg999 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 02-12-2018, 02:16 AM
  6. Replies: 2
    Last Post: 02-18-2017, 04:11 AM
  7. VBA to save specific sheet to Google Drive
    By JDW_ATX in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2014, 01:11 AM

Tags for this Thread

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