VBA to Create Google Sheet, Move files, Add or Delete Tab Office

VBA to Create Google Sheet, Move files, Add or Delete Tab Office Now let's say that uh this example here demonstrates uh creating a new file called expense to and then um you don't always have to pause you know.

Like the methods in this way um the good thing about this is that you specify a variable and then you call a method so when it returns a value you can use.

That uh to you know like to utilize it somewhere else um or to to track it or log it right so for example in this uh creates uh.

The sheet um service and then uh it creates a new google sheet and then here it adds a new tab called data and then it deletes the tab call sheet1.

Yeah the default tab and then it terminates uh the file uh the service and then it initializes the drive service here in the same module so this way you can.

Combine all this together uh and then it create it uh uses this move object to move the new file that was created.

VBA to Create Google Sheet, Move files, Add or Delete Tab

To do a folder called x-men so let's try this uh i'll go to data uh we'll create a file by default the file is added to the main parent folder so we'll create a file and.

Then move it to this expense data folder we'll call this expense data and then we'll add a new tab called data within this particular file and.

Then we'll delete the default sheet and then we'll move this file to this folder okay so i'm gonna run this so there's expense data there it got.

Moved and if i go in here here's expense data and if i open this particular file you'll see that the new tab has been added successfully.

And then uh the the the default tab has been deleted okay so this this is example of how you can combine um google drive uh matches as well as the sheet uh.

Methods and then different ways to call it you can simply call it uh in this fashion as well if you don't want to pass it you know like.

    X is equal to uh similar similar to this

    Okay you can call in this fashion as well or you can directly call the method in this fashion.

    Or with this particular object dot you know underscore this i mean dot add new method uh you can also directly call in this method if you use this approach then you don't have to.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continue to make videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=1LiXUHtyyT4
Previous Post Next Post