myfile

  1. V

    Save file as folder name/sheets as file name

    Hi I would like to change this code to save the file as the folders name instead of "Total Results.xlsm" Also I'm trying to name the worksheets the same as the files that its importing instead of "Data" & i +1 Thanks a lot to anyone that can help Sub ImportCSVData() Dim wb As Workbook Dim...
  2. M

    Unprotect copied protected sheets and paste a range as value

    Hi All I have this code below, I'm trying to figure out how i can copy protected sheets and unprotect together with copying a specific range and pasting it as value only. Hoping for a quick response. Thank you! ? Sub CopySheets() Application.ScreenUpdating = False Dim MyFolder As...
  3. J

    VBA to find next empty row in worksheet isn't working!!!

    Hi guys, i'm not amazing with VBA but can take stuff and change it to suit my requirements, although this code isn't finding the next empty row, it's just pasting data on top of data, so instead of getting 20 rows of data, i'm just getting 1 and it's really infuriating!! I have a multitude of...
  4. 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...
  5. G

    Application.GetOpenFilename error

    I'm having new problem with a macro that I have been using for several years. The macro allows me to import data from a prior year spreadsheet into the current version of the spreadsheet form. The problem is intermittent and only seems to occur in specific folders on my laptop. MyFile =...
  6. 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...
  7. F

    VBA: Combine multiple workbook into one

    This code works great to combine all workbooks from a folder in another master workbook. Problem though, to get it to run I have to remove the ActiveWorkbook.Close True part because that closes the workbook that I'm running the code from. The destination workbook. How can I say, if the file...
  8. B

    if file name in column C is red the delete that file from folder

    I am trying to delete old files from a folder. file names are in column C and old files are colored RGB(255,0,0) i get an error when running this code." file not found". i tried peacing different codes together but, i'm still learning. Sub Delete_test() Dim MyFolder As String Dim MyFile As...
  9. kelly mort

    Get full path to a file - vba

    This code here get me only the name of the selected file with its extension. <code style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo...
  10. S

    Login to Shared Folder Via IP Address

    Dear Friends, i am learning VBA and went to several websites and forums and with the help of those i have created a small tool in excel. where it gets collated multiple sheets into one, as of i have mapped the drive and its working file however now i want any one can do this exercise and its...
  11. B

    VBA find offset & replace cell value

    Can anybody help me a bit here, I am trying cycle through a folder open each Workbook in turn find a value in column I on Cost sheet and then offset from that cell to column L , I’e 3 columns across. Then I need to change that cell value to 60. The code to cycle through the files and open them...
  12. B

    Modify code, to open all files in a directory except one

    Could anybody help me a bit here please, I have some code which opens all the files in a directory & copies and pastes information onto a sheet. I need to modify it so it will open all files except one file named WIP. I did try modifying this line Do While myfile <> "", but it just gave me an...
  13. R

    list files which do not contain sheet: TEST

    I have used this to list files in folder, but now want to only list files with do not contain a worksheet "TEST" can anyone help please? To go one step further I would move the files which do not have worksheet TEST to a new subfolder "NO TEST" Thanks in advance *********** Sub List_Files()...
  14. S

    Won't Open network folder

    Hi, This macro allows the user to select a folder and loop a macro through each excel file in the folder. This works fine on my own hard drive but the moment i select a folder on the network it just go straight to saying the "task is complete". It appears that it doesn't see any excel files in...
  15. B

    Listing excel files in a folder

    Can anybody help a bit I please, I am putting together some code to list the excel files in a folder in column B, open each one in turn copy a value from cell D142 and paste in column C next to the file name. What this should achieve is the a filename in column B and the description next to it...
  16. O

    Simple code help an old man

    HI There M steps fr my code are: Sub GET_IOR_DIAGNOSTIC_DATA() 'OPEN FOLDER Dim myfile As String On Error GoTo 100 Dir "I:\Blenheim House\Analytics\North Region Report Library\StEIS\STEIS Tool" myfile = Application.GetOpenFilename Workbooks.Open (myfile) 100: Exit Sub 'MSGBOX SELECT FILE...
  17. 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...
  18. B

    Macro not pulling the correct data - Help!

    Hi Guys, I hope you can help with the below macro. It runs well as long as Sheet1 is visible (Ideally I'd like it to work even when sheet1 is hidden) however I've also now noticed that it's actually pulling the data from the last tabbed saved in the workbook rather than referencing Sheet1. So...
  19. B

    Running VBA on hidden worksheets

    Hi All, I currently run this macro on multiple documents in a folder. What I'd like to do is hide the worksheet - Sheet1 but still allow the macro to run. Can anyone help with the below to allow the macro to extract the data from sheet1 whilst the worksheet remains hidden Many thanks, Paul...
  20. Y

    Textbox to search Listbox

    I would like to have a code that will search the items in my listbox. The search should not be case sensitive. This is my code Private Sub UserForm_Initialize()Dim MyFolder As String Dim MyFile As String Dim j As Integer MyFolder = "C:\Test" MyFile = Dir(MyFolder & "\*.xls") Do While MyFile <>...

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