foldername

  1. D

    Macro move file to existing folder by name using filename first left7 digits with a space delimiter

    I'm looking for some help. I started trying to use excel for this project yesterday. I originally scripted a batch file to run this operation. The batch works in a small and limited environment. I tried the batch in a live folder and it was a complete failure with files being multiplied and...
  2. G

    copy based on NAMES instead of ID

    Hi Everyone, Below i have a code which copies based on cell values(Highlighted) but instead of cell values, can we copy through cell name (Cell names which would be only in "Column C") FolderName = Worksheets("copy").Cells(2, "K").Value & "\" If FolderName <> "\" Then FileName =...
  3. V

    Macro taking long time to execute.

    Hi all, Have to generate 640 files basis district name. The output sheets are formula based , they pull the data from input sheets. Mostly the sumifs formula is used. It takes almost 5 minutes to generate one single file. Perhaps with each change of district the calculation features takes time...
  4. R

    End With without With, BUT WITH EXISTS!

    So the current error I get is an End With without With I've tried to add something that has "with" and then I get the error "For without Next" and if I add a Next, then I get the error "Next without For" What the heck am I doing wrong? I'm trying to do the following tasks: 1. Create a folder...
  5. A

    Compile Error - VBA

    Hello All.... I have a VBA code that should be taking worksheets and saving them each as their own excel file in a new folder. I had previously had this code working, but then made some modifications to my file, and as a result, this code is now giving me a "Compile Error: Wrong number of...
  6. L

    Excel to be closed Automatically after running Macro

    I am very new to creating excel Macro. Please suggest me how to save and close the excel after running macro. I am using this VBA macro for concatenate more than 70 + excel files. It is difficult to save and close such big number of files at one time. It would me grateful if you could provide...
  7. G

    VBA macro to print to .pdf

    Hi all, I looked up a macro on this site to print an excel sheet to pdf, but I'm running into some issues when using it. Now, the post is 8 years old, so I suspect some of the commands have changed since it was posted. The error that I'm getting is a compile error "Assignment to constant not...
  8. R

    VBA Loop through and rename all workbooks

    Hello, Can someone look at this code and add a command to rename each workbook as the macro runs? This macro loops through a folder and converts all workbooks from .csv to .xlsx. I would also like it to rename each workbook. Looking at this code, is it possible? Sub ConvertCSVToXlsx() 'This...
  9. A

    Print to PDF macro +custom filename +custom folder and subfolder

    Hello, I'm having trouble getting a macro i found here on this site to work, i have tried to do some modifications, but VB is certainly not my strong side... This is the macro: Sub Make_PDF()' Create and save .pdf Dim pdfName As String, FolderName As String, SubFolderName As String, FullName...
  10. D

    Setting initial file name and path on GetSaveAsFilename

    I can't seem to figure out why upon GetSaveAsFilename, the file path is not what is coded. If I use the FolderName, the InitialFileName works, but if I tie FileName to the address, it defaults to Documents. The routine also needs to check if the document is open (if open, close it) and/or if the...
  11. C

    File and pathname with spaces

    Below is an extract of some code that fails because there are spaces in the pathname and the filename (e.g. "AR timesheet.xlsm". I have tried various options such as Chr(34), """"" and %20 but can't seem to get it to work. If I take out the spaces in the path and filename then the code works...
  12. R

    VBA to read files in directory and total two columns

    Good Morning, I have a directory with 20-30 files (it could change every month) with all the same layout, but different amount of rows. I need to total up two columns, and came up with the following, but it is erroring out on the lRow line. I should mention that I've used this code when...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top