filepath

  1. B

    Removal of Duplicates when re running the report

    Hi Guys, 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...
  2. D

    Copying sheets to existing workbook, workbook name is cell.value

    Hi all!! 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...
  3. B

    Save as

    Evening Looking to remove the .xlsx from the export to PDF in the below script. Thanks guys Sub PDF()Dim wb As String Dim filepath As String wb = ActiveWorkbook.Name filepath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\" & wb & ".pdf" ActiveSheet.ExportAsFixedFormat _...
  4. B

    Run Time Error

    Afternoon Is there a work around to the below seems to work well in other scripts. The error occurs at the ThisWorkbook.Activate Thanks All... Dim filepath As StringSet wb2 = Workbooks.Add ThisWorkbook.Activate ActiveSheet.Copy before:=wb2.Sheets(1) wb2.Activate filepath =...
  5. J

    finding a reference workbook

    I am creating workbook1 that needs to take data from workbook2. The problem is that the file location of workbook2 sometimes changes, or paths are renamed, or on a yearly basis the name of workbook2 might change. I would like to circumvent this problem with a dialogue box/input box that gets the...
  6. B

    File Save

    Good afternoon Is there a way to insert the Month Day Year Hour & Minute combined with the "Results" file. Thanks guys.... Dim wb As Workbook Dim filename As String Set wb = Workbooks.Add ThisWorkbook.Activate ActiveSheet.Copy before:=wb.Sheets(1) wb.Activate filepath =...
  7. D

    macro to open file with dynamic name on sharepoint

    Hi guys, I have this report that I update each day, and my process is: 1.) go to sharepoint 2.) look for file name 3.) download 4.) make my changes for step 4, I already have a macro created to help me out with that. however, for steps 1-3, i was wondering if I could use some automation for...
  8. S

    VBA - save as .csv and .text under one button

    Hi There, I have a problem that I can't figure out. I have two sub's that needs to run under one button, and the thing is that it have to create sperate type of file to export (.csv and .txt) normally they work, but when the CSV file needs that save then it will not? Can someone help me on this...
  9. eliW

    Why am I keeping have this error in VBA

    Hi all, I am trying to copy files from a folder and subfolders to another destination according to list in first column of a worksheet. BTW, the list contains full path and file name like this: 713It's My Party -Lesley Gore.mp3 F:\A04 714Sleep walk -Santo and Johnny.mp3 F:\A04 Exexcuting this...
  10. D

    How yo Kill File Path has Unsupported Language ?

    Greetings How to VBA read "C:\Users\User\desktop\ملف عربي.xlsx" it converts "ملف عربي" to "??? ????" Sub KillFile() dim FilePath as string FilePath= "C:\Users\User\desktop\ملف عربي.xlsx" Kill FilePath end sub Sub KillFile() Dim FilePath As String FilePath = "C:\Users\User\desktop\...
  11. F

    VBA: Save current workbook with new name

    I need to save the current workbook with a new name and then run a macro on just the new workbook. I would also like to close the new workbook, but keep the original workbook open. Here is what I have so far. The new workbook is getting saved with the macro running on the new workbook, but...
  12. P

    Need Help Looking for errors

    Hello Everyone, I cant seem to find what is cauing my error.. I s a simpl code to on a file in the foldercopy a column ofdata nd pase in thedestination file on the next open column. Can someone help, maybe Ijus need more sleep, becaue I antsee it. Sub LoopThroughDirectory() Dim MyFile As...
  13. M

    Excel VBA - Populate ComboBox with dynamic range

    I am trying to populate an ActiveX ComboBox with the values from a dynamic range from another workbook which I have set a variable for. The variable is returning the dynamic range properly but I can't figure out how to get these values into my combobox. Everything I try gives me a different...
  14. A

    How To Save File With User Enter path with Input BOX

    Hello Every one Dim T as Variant T = InputBox("Enter Your CORP ID") ChDir "\\Client\C$\Users\T\Desktop" ActiveWorkbook.SaveAs Filename:= _ "\\Client\C$\Users\T\Desktop\From Application to MIS_V.0.1.xlsm", _ FileFormat:=xlOpenXMLWorkbookMacroEnabled...
  15. B

    VBA copying data from all files in a folder

    Hi everyone, I have written a small piece of code but I am having trouble finishing it off. Below my code opens all the files in a folder, selects a sheet and copies a range of cells which it then pastes to a master spreadsheet. After I have pasted the values to the master spreadsheet I need...
  16. G

    Excel Changing Link to other Worksbooks

    Hi Would appreciate and help and advice. I have a file with thousands of links in cells to other workbooks, I need to change the filepath to these links, which I've done with a find and replace, despite the updated filepath being correct, it is still opening the Open file dialogue box for...
  17. M

    VBA - Dir function not working

    Hi there, This is driving me nuts! In my current workbook I have a number of references to another workbook. In the Auto_Open sub, I want to check that the filepath for that external doc is still valid, and return an info message if not so the user can update the links if necessary. As I...
  18. R

    "Dir" problem

    Sub getCountryFile() Dim filePath As String filePath = "z:\allUK\EVR" If Len(Dir(filePath)) > 0 Then Workbooks.Open (filePath) Else Debug.Print "doesn't exist" End If End Sub Where filePath is valid, and the Workbooks.Open works fine if tried outside the...
  19. P

    https vba javascript

    I'm trying to access a https page to download a PDF file that is returned by the server with the following url format: https://xxx/clApp?xxxxx=makeReport&xxxx&endDate=31aug18&beginDate=01aug18 <code>Sub SavePdfFromURL() Dim fileUrl As String Dim filePath As String Dim WHTTP As Object...
  20. L

    VBA: Saving file [Changing filePath= to be a user-prompted location]

    Hello! I've been able to cobble the code below, using bits and pieces I have found online. The below works fine and does what I need it to do. However, the file is generated in a static location but I want (a) the user to select where to save the file, (b) the saved file to retain the...

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