filepath

  1. T

    Macro isn't consolidating data

    Hello, I am trying to code macro to consolidate all workbooks in a file on my computer. My macro seems to work but is not pasting in data from the other files into my master (zbook1). Can anyone assist? Sub LoopThroughDirectory() Dim MyFile As String Dim erow Dim Filepath As String...
  2. O

    Problem with putting an "TxT" file help fast!!!

    Hi, i had an issue in my job, i have to load an .txt file to excel but i can't get it to work help, the route it's fine and the msgBox displays the txt file, but the Open functions says err 53 not found... Sub OpenTextFile() Dim FilePath As String FilePath = Dir(Application.ThisWorkbook.Path &...
  3. S

    VBA Code error for saving PDF of Similar Templete with Changed data

    Dear Sir, I need to save one invoice template by changing data upto specified invoice no's. But my code showing an error. Kindly help me. Sub Savepdf()Dim from, to1 As VariantDim flname As StringDim filepath As Stringfrom = Sheets("Invoice").Range("E3")to1 = Sheets("Invoice").Range("E4") For i...
  4. B

    Excel VBA: Save As with Filename/Filepath/Date&Time

    Hello all, I am currently needing to add a "save as" function to add both the date, and hour to the filename. Currently, the script I have is below. Sub SaveWorkbook() Dim FilePath As String Dim NewName As String FilePath = "C:FILEPATH": NewName = FilePath & "Pack Labels" &...
  5. N

    PowerQuery : Retrieve table data from all files in a variable folder

    Hi, I've just started dipping my toe into the world of PowerQuery and M and I can see the potential of what it can do ... however my skills aren't quite there yet ! I have a folder called Weekly Reports that will contain folders full of xlsx files saved by weeks eg : 2018-05-21 2018-05-28...
  6. G

    Interact with Power BI using VBA?

    Is this possible? I'd like to add a button to our custom toolbar on a standard report that opens a .pbit file and enters the file path of the existing file as a parameter. I am fine to create the toolbar icon, extract the current filepath etc, but I don't know if it is possible to open and...
  7. W

    Creating a filename from information in a cell in excel

    Hi, I am new to the forum, so I hope I am posting in the right place. What I am trying to do is set up a macro that saves the workbook to a specific filepath and creates part of the filename using the customer name in a specific cell. The filepath would be: N:\\Dserv-FS\Customer Profiles\BRM...
  8. S

    Renaming files within Sub folders

    Hi, I am looking for some help to adjust this VBA. I use this to rename files within a folder, but it only works for the files listed in the main folder. How can I modify this code to rename files that are located in the subfolders too? Thanks in advance Sub rename_folder() Const FILEPATH As...
  9. kelly mort

    How to show message box if a filepath or folder is not empty

    Hello Geniuses, I am stacked here. I need a script that will check my filepath or the destination folder to see if there are files there already. Then display alert. Thanks Kelly
  10. F

    VBA Question - open file in variable path based on the current month and then text to column(FixedWidth)

    I need to open a text file from a variable file path (which is varied by the month) and then do the text-to-column for the text file. However, the error msg pop out which is stated [Compile error: Named argument not found] when i tried to run the below code in VBA. Anybody can help? Thank you...
  11. kelly mort

    Upload Image Challenge

    Hello Geniuses, I have this challenge here and I need you all to help me nail it down. I want to do something cooler with a userform by clicking a button which will open a dialogue box where I choose the picture I wanna upload. I started this and suspended for a while and wanna get buck to it...
  12. J

    VBA: Not quite working

    My coding is going to Call Forecast_Day_3 when I want it once it has tested the file is there (which it is), to go to Else...Any ideas what is wrong here? Many thanks. Sub Forecast_Day_2() Dim destcell As Range, r As Long Dim fileSpec As String, folderPath As String, fileName As...
  13. andrewb90

    Create a copy of workbook with VBA

    Hi all, Basically, I need VBA to create a copy of my workbook (equivalent to press F12). The name would be the same with the added (view only) in the name, and the file path would be the same. When I used the recorder I got this: ChDir "C:\Users\AB\Desktop" ActiveWorkbook.SaveAs...
  14. N

    Using if else if to determine file location

    Hey guys, I am trying to use a If ElseIf to determine where to save a file. For instance if A2 equals A, it will save in one location. If A2 equals B, the file will save in another location. Below is the VBA code I have so far. It will recognize the first if statement but will not carry out the...
  15. T

    VB Question. Strange printing sheet issues

    Hi my name is tony ,i was working on a sheet that allows me to send email directly from it. I program allot in Autoit (more advanced VB) but here i am lost. Everything works great but there is one problem. Once VB saves the file with this code 'Save curent file to desktop for attachment...
  16. N

    add / in between filepath VBA

    Hi all, I am trying to format the filepath from: \Active\1-OperatingCompanies\abc\report\excel.xlsm to \\Active\\1-OperatingCompanies\\abc\\report\\excel.xlsm. Do you guys know how I can do this in VBA? Thank you.
  17. S

    GetOpenFileName initial Path

    Good Evening All, I'm using the below code to select .xml files for import. I would like the import dialog box to remember the location of to last file as that is where the subsequent files for import are most likely to be and will therefore stop the user having to hunt through tiers of...
  18. A

    Showing images in a cell based on filepath

    Hello everybody, Im really new to VBA and Excel and my question might have been asked like a thousand times, however I still didnt manage to complete my goal. Hopefully you can help me. What I want: I want to show images in a cell based on a filepath. Lets say: A1 = Flower A2 = Dog B1 =...
  19. L

    Check if specific file exists, and update cells based on this

    Hi, Here's some sample data: <tbody> Name ID No File James Hetfield 758-6985-236698 Yes Holly Lawrence 526-6987-698547 False </tbody> But instead of one set of "ID no/File" columns, I've got multiple (drivers license/file, passport/file, etc). What I need to do is, when the excel...
  20. R

    VBA - Find Matching cells and insert Filepath in new sheet

    Hello all, I am completely new to this forum - so apologies in advance for any redundancies within my question, and thanks in advance for any and all help given. I currently have two columns in two separate sheets: Column1 (Sheet1) contains random numbers (cusips), while Column2 (Sheet2) has...

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