Hi. I am building a macro power query and I want to share it with other people. It uses a folder saved on your desktop but obviously people have different logins. How can I change the source name to recognize the username for the desktop? Thank you. Here is the beginning of my code...
Can anyone please help me.
I am trying to add to the macro below, but i can't seem to find the right method.
I am searching a folder for picture files. My issue however is, that am only able to search for files using a "*" as i do not know the full file name, only a article number...
I have a macro that uses the GetSaveAsFilename which is fine except it makes the user type in the file name to save the file. The issue is people mistype the file name which messes up other macros down the line. The file name never changes but the folder location does so the user needs to be...
I am working on some automation and need your help in vba code to get excel file names from respective folders......for example ..I have 10 different folders and need the file names those were inside the folder to excel cell starting from A1, A2, A3...so on...
if I get the complete...
I'm having some issue on coding for an "item" count from multiple folder locations.
The code below works fine for looking at a single location on a network drive but, of course, now I need to look in alternate locations...
In a nutshell: if a value in column D = "A" look in location...
Hello, I am running the code below (from Terry Kraft) from within excel and it forces the user to select the location of the files to import into access (opens up a box where the user navigates to the folder and clicks OK). I was wondering if anyone sees an easy way to adjust the code so I can...
Dim path As String
path = "C:\Users\Desktop\TEST\"
file = Dir(path & "*.xlsm")
Do While file <> ""
Documents.Open Filename:=path & file
file = Dir()
This is my code for running a...
I have a code that copies workbook to a folder by cell value (A1) and month/year. It works fine but I need it to send a 2nd copy to another folder so I can have a back up. I would like to have the workbook copied to two separate folders with the same exact name (value in A1 and month/year). I...
I've been working on this for hours, and I'm ready to ask for help. I'm a relative VBA beginner, and have been teaching myself over the past month.
I know exactly what steps I want this program to take, but am having trouble implementing those steps in a way that is concise, because I...
Hi Excel community,
I am a beginner in excel vba and want to ask this question. I want to be able to open the file that has selected date in it.
For an example,
Date input = May 1, 2015
Month = May (cell 1)
Date = 0501 (cell 2)
Then, run macro, it will attempt to find the folder name...
I have the following code:
Dim sFile As String
Const sPath As String = "C:\Users\CAB\Desktop\Chrono\"
sFile = Dir(sPath & "*.txt")
Do While sFile <> ""
Workbooks.OpenText FileName:=sPath & sFile _
, DataType:=xlDelimited, Tab:=True
i have inherited an access tool that imports a file into its database, makes a series of changes, then in its final stages exports the file back into the folder it originally came from with changes. this all works fine.
however, what i want it to do, is export the file, but rename it to reflect...
I use this code to get all files in a folder/subfolder, but the problem is if my folder has spaces in its name then it does not work. e.g in this code, c:\a\*.dgpx will work but c:\a a\*.dgpx will not work.
c00 = "c:\a\*.dgpx"
Can any one provide me the macro code for the below requirement.
I have number of folders where need to save huge number of files in it on everyday.
I need a macro code/solution to extract the given path folder data in to excel sheet (only the file names in the list format). Manually...
I have this script that will go through a folder in which the path is hardcoded into the macro and consolidate all of the .csv files into the .xls I am working with utilizing Excel 2007.
Dim fName As String, fPath As String, fPathDone As String, OldDir As String
Dim LR As...
I have over 15,000 files on a file share. I am looking to try and extract the path for each individual one and paste it in a long list on a sheet with its associated folder. I'm having a hard time of where to start. the most difficult part is there are thousands of folders and different...
I can run a pull for files I've names in a folder using the following Macros:
' Open the ELC Audit Workbook and Copy into buffer
Workbooks.Open Filename:=ActiveWorkbook.Path & "\2011 - RCM - ELC Tests Plant.xls"
I have a protected spreadsheet that links to another spreadsheet that is in the same folder (C:\example\master.xlsx and C:\example\subordinate.xls)
I want to be able to use them both in any computer (that means, in any folder). For instance, I would like to be able to paste those two files in...
- I have the following folder/file structure:
...etc - it keeps on going for more subfolders.
- Every subfolder has 2 different .csv files.
- Every file has the same structure. Relevant...