I have found a great macro which allows you to check for the existence of folders in a file-path matching: Year, Month and Day (i.e., creating the folder if it doesn't exist).
For instance, if the FilePath starts: C:\Temp Time Sheets\
it checks for
C:\Temp Time Sheets\2019\
I have been using a macro successfully for sometime now, but I have just bought a new machine and I am running W10 and 365 E3 and now the macro will not see the path of the file
The files are all stored in the cloud (Office 365, OneDrive for Business) but are also synced with File Explorer
I've got this code below which creates a PDF document. The error message appears saying I'm unable to open the document because:
it is either not a supported file type or because the file has been damaged
Private Sub Command273_Click()
Dim wdApp As Word.Application, wdDoc As...
I'm pretty new to VBA, this is my also my first time posting on here. Hoping somebody can help me tweak my code;
The code loops through all the files in a folder to copy data from a sheet called ("P&L 2019 - UK GAAP") into one workbook.
The issue that I'm having is that, a couple of...
Here i am trying to copy multiple worksheets to new workbook and below is my code
Application.EnableEvents = False
Dim FlName As String
Dim FilePath As String
Dim newfilename As String
FlName = "Copy"
FilePath = Cells(2, "K").Value...
I have seen the great value of this website I'm not really experience with VBAbut relaying too much on MREXCEL
i'm adding a code to for a button on the excel so when you click on it
It should openthe saving as box with a specific name reading form a cell
I found the acode but my...
I am trying to write a formula to reference cell A1 in this workbook. I am using the entire filepath in hopes of being able to access the data without the other workbook being open.
I've generated a query from a folder containing dozens of workbooks. I'm using table 1 from each workbook, in the query editor I have all my data including the source workbook, but I want to add the filepath to each row. How to I add an extra column with the filepath inside the...
Hi I have a workbook with a filepath that has another workbook with a sheet i need to copy and paste. So Workbook “A123” has filepath in cell D42 and I need to open that filepath and copy the specific sheet called “Master Sheet” and paste it into another sheet in workbook A123 called “Allocation...
I hope you can help with the below macro. It runs well as long as Sheet1 is visible (Ideally I'd like it to work even when sheet1 is hidden) however I've also now noticed that it's actually pulling the data from the last tabbed saved in the workbook rather than referencing Sheet1.
I currently run this macro on multiple documents in a folder. What I'd like to do is hide the worksheet - Sheet1 but still allow the macro to run.
Can anyone help with the below to allow the macro to extract the data from sheet1 whilst the worksheet remains hidden
I am trying to move a sheet from activeworkbook to a file that is stored in a folder. Any help is greatly appreciated, I have attached the code that i am currently trying to use. I feel that i am over thinking this.
'Move the active sheet to the end of named Workbook...
I am using a macro to rename all my file in a folder with a specific cell value, the macro also rename the sheetname with the same cell value.
It works fine for what I need, the only drawback is that the macro is sometime terribly slow.
1) Could someone give me some tweak to speed-up a...
Hello and thanks for considering an issue I'm bringing up.
First off - this is relevant only to files stored on DropBox or, very likely, other cloud storage platforms. And only due to the files being accessed on different computers.
The problem appears to be that Excel typically uses absolute...
I'm wondering if there is an easy Visual Basic program that can do this:
I have multiple spreadsheets (any where from 1 to 300 on any given day). For each of these spreadsheets I need to run the same Macro and then save the result in a specific folder. Is there a way to do this in a batch where...
I was hoping you can help. I have the below VBA macro running in a master file (named ZMasterFile).
The idea is I have this file in a folder where up to 100 excel workbooks are stored and I use it to extract some data from each of the workbooks and collate on the ZMasterFile.
I hope you can help -
The below is something I have built out to grab data from about 90 workbooks. The challenge I have is I need to run this each week as the data updates however this duplicates the data and I would like it to avoid this so that it only reports on the latest data...
Very new here. Having a hard time to debug.. I am currently trying to make the macro work as the following:
create new sheets and rename it to cell.Value in range, and if there is a workbook (also named as the sale cell.Value) in the same folder as the macro, copy this sheet into the...
Looking to remove the .xlsx from the export to PDF in the below script.
Sub PDF()Dim wb As String
Dim filepath As String
wb = ActiveWorkbook.Name
filepath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\" & wb & ".pdf"
Is there a work around to the below seems to work well in other scripts.
The error occurs at the ThisWorkbook.Activate
Dim filepath As StringSet wb2 = Workbooks.Add