mypath

  1. B

    Format 51

    Good Evening Looking for some assist here. I am saving a workbook whichcontains several worksheets. When the new file is created there are two issues. 1. Message indicating to save the new file as an xlsx not amacro enabled file. 2. The new Worksheet the sheets have been grouped. How...
  2. D

    How to define Dropbox folder path in VBA for access by different users/usernames

    When you install Dropbox, it generates a folder path that incorporates your Windows username. So on my main computer, the path is: C:\Users\peter\Dropbox\files\ but on my secondary computer (different Windows username but access to the SAME dropbox folder), it's: C:\Users\david\Dropbox\files\...
  3. A

    search folder for latest file creation date, not latest modified date

    The other day i found a snippet of code that has helped me locate the latest version of all files in a particular folder. How do i amend this code so that the file that is ultimately opened is the one that has been created latest, irrespective of when files have been modified...
  4. A

    workbook close not working

    folks, I have a macro that , so far, opens another workbook, copies a certain tab into thisworkbook, and now I am trying to close the second workbook. when I run the macro, I get a "subscript out of range" on the Workbooks(MLPwkb).Close False line. here is my code: Option Explicit Sub...
  5. J

    Create .csv file from a workbook sheet with new filename and timestamp

    Hi all, Im not great at VBA by any means but since moving to mac I cant seem to do anything i used to do with ease. I am simply trying to create a macro that copies a sheet in my active workbook to a new .csv file with that sheet name as the title and todays date and time in the newly...
  6. L

    Vlookup with the latest File in folder

    Hello I am trying to create VBA code where it extract data from the most recent folder in a directory and uses it to drop data to another folder. I got the latest file part working but i'm having trouble with the Vlookup portion i.e calling out the latest file. Here is my latest file code...
  7. M

    Using ADO to add date to another workbook

    I'm using ADO to connect one workbook to another and then update certain fields. This works with no issue with the exception of dates. The workbook being updated has a "Timestamp" column formatted as "yyyy-mm-dd." No matter what I try, the update fails when the SQL is run with the error...
  8. J

    Can I check if all excels in a folder have been given password protection?

    First, I am not trying to crack any passwords. I am, instead, trying to make sure that a large folder of excels all have been password protected. Obviously, the issue with something like the below is that I have to open the password protected wb to set the variable (which I can't do with a...
  9. G

    How do I amend a macro to check if read only

    Hi I have the following macro but im trying to get it to notify me if its read only when opening. How do I do this and can it be tidied up? Declare the variables Dim MyPath As String Dim MyFile As String Dim LatestFile As String Dim LMD As Date 'Specify the...
  10. J

    Delete all Word files but one via vba excel

    I have several individual word files in a folder and one word file that is a merged version of all those word files. I would like to delete all the individual word files after the merge process, so only the Merged Word document remains. (I'm running this code via Excel, not Word) Any ideas on...
  11. M

    Macro to pull data from multiple workbooks

    Hi everyone - I am trying to create a macro to pull a specific cell from multiple workbooks. This cell will remain the same throughout (A1). The issue I am running into is when the macro is ran it does not immediately identify the sheet. When ran it will force you to select the correct sheet...
  12. S

    Macro VBA loop through, convert column to text then to general formatting

    Hi All, I have written a code to try and format A:12 down to general from a date format. I have since discovered the code wasn't working as I need to use the "column to text" function. I have tried a few methods to get the code right (including recording) but when i actually run the macro it...
  13. S

    Changing file names causes an error

    Hi i have a macro that changes the names of files in a directory i chose. But i have noticed if i want to name two files the same it causes an error........is there something i can incorporate in the coding to highlight this or to create a second file with the same name? Sub RenameFiles()...
  14. S

    msg box help!

    Hi i have the following code to grab names from a folder i specify, however how can i have a message box that tells me the number of files name returned back? Sub FetchNames() Dim myPath As String Dim myFile As String myPath = Range("H2") myFile = Dir(myPath & "*.*") r = 2 Do While myFile...
  15. R

    Excel VBA - Loop through files and make changes to names and file type

    So I am trying to loop through all the files in a folder and make either changes to the extension, the name or both. I have code (see below) and the problem is that it is only looping through files with extension ".xslx". I need to make changes to the names of all ".pdf". I need to make...
  16. V

    What and where put code to run macro in all sheets (in opened workbook)

    My problem is, where and what to put inside my macro to run macro in all sheets in currently opened workbook. I tried several things but without success. Sub LoopAllExcelFilesInFolder() Dim wb As Workbook Dim myPath As String Dim myFile As String Dim myExtension As String Dim FldrPicker As...
  17. taz23340

    Network Mapped drive Excel freeze when running macro

    HI Everyone, been awhile since i have needed your help but im really stumped. the below macro has been in use for over 10 years with periodic correcting of some lookups within the file itself and the only change to the code has been to change the location of the dump file (what this file...
  18. G

    Finding the right folder with VBA

    Hello, I have a spreadsheet that is updated with a macro finding the latest download in an appropriate folder. It looks as follows: MyPath = "C:\User1\Downloads" MyFile = Dir(MyPath & "*.xls", vbNormal) ...... Everything is working fine. Unfortunately, recently all the users have been...
  19. S

    Load ListBox through MFDialogboxFolder

    Hi All, I am trying to load a listbox through MFDialogbox Picker. Unfortunately, its not working. Request your help. Below is the code, I am using. Thanks Private Sub UserForm_Initialize() Dim myfiles As String, mypath As String Dim fileList() As String Dim fName As String Dim...
  20. S

    Macro to convert multiple files to text file

    Hi, I have a macro which currently allows me to select a folder contain several files, perform a task(line deletion) on all the files and save each one in turn. This works great but the file type I need to save as is a text file and currently my file type is an .spe file. I've looked at many...

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