strfile

  1. N

    Opening a csv file to avoid corruption WITHOUT creating a query

    Hello A csv file I need to open contains quite a number of foreign characters. By default, opening it in Excel corrupts them. I have been using this to open it (successfully, without corruption): Sub Open_CSV_Correctly() Dim wb As Workbook Dim strFile As String strFile =...
  2. L

    CSV Import - Runtime Error 1004

    Hi, I have a problem when everytime I run my macro for importing and converting CSV files that I get a Runtime error 1004 saying that it cant find the text file etc. The thing is that if I record a Macro to import the data and copy and paste the path (which is exactly the same as the one I have...
  3. T

    TransferSpreadsheet with Password

    Hello I've been using the below the code to import numerous excel spreadsheets from a specific folder into an access table, however the spreadsheets are all now protected with the same password. Does any one know how I can define the password in this code, preferably without opening and...
  4. 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...
  5. sharky12345

    Errors trying to import Excel file from Outlook message

    I am getting a random error 91 using the following code, the error reading 'Object variable or With block variable not set'. The procedure is supposed to check the selected Outlook message and if if has an Excel file attached which has part of the filename being 'Raw Data' then it should open...
  6. M

    Word Form Data to Excel Worksheet

    I see some old post to this for table data, but not form data. I also have tried some of the internet solutions, the "closest solution" I saw for macro to do what I wanted was as follows, and for some unknown reason to me , its not working? Error message is "Run-time Error '438': Object...
  7. I

    VBA - List all Files in Folder - Dir() stops part-way through

    Hey I've got emails in a desktop folder and I'm trying to list their file names in a worksheet. I've written the below code for that purpose but I'm facing a couple of problems: 1. The filenames are truncated: 20080607-MySpace pa#BFD0E4.html appears rather than 20080607-MySpace password...
  8. T

    Copying CSV to Excel

    Hi Everyone I have been using this code to copy data from csv file and merging it to a sheet. However, it has started messing up for some reason. Instead of pasting the data in new row starting from last row, it goes to the last column entry of first row and keep going to the next column (no...
  9. L

    Looking for Last Updated File and importing a specific sheet

    Hi there, I have a bit of code that automatically looks for the last edited file and opens it. It looks at the current folder and the previous folder in the file structure which is important. What i would like to add is some code to open/copy/mirror a specific sheet into another workbook...
  10. N

    How do i run a Macro of one workbook on another workbook?

    Hi, I have tried googling this and couldnt find anything. I am opening an existing workbook using strFile = Application.GetOpenFilename Workbooks.Open strFile I would like to run a macro function called Transpose belonging to the previous workbook on Workbook that I just opened. how do I go...
  11. L

    Please help!

    HI there, I am a complete novice in excel and get by by scavenging code off of forums and playing with them until i get them to work.I have how ever hit a wall. The following code works as a macro assigned to a button, but when i place it in the *This workbook page so the macro is run on start...
  12. H

    Attach all files in folder to email except one

    Hello all, I'm looking for a vba code which will attach all files in a specific folder except for one ending with .xlsm. The code which is Bold is the code which attaches all files in that specific folder to the email. I've got this code now: Sub Mail() Dim OutApp As Object Dim OutMail As...
  13. J

    Outlook 2007 macros does not run

    Hello all, I just got a new computer and this code does nothing inside outlook. I enabled all macros inside outlook. this code worked fine yesterday on my old computer. I remember there is another step to get macros to work inside outlook 2007. can anyone help me rememeber what that is to run...
  14. countryfan_nt

    Combine all sheets from different workbooks in 1 Summary Sheet.

    Hello friends! Hope all is well, I have the 2 codes below, that work smoothly, and must be applied in order. The codes in short combine the sheets’ contents of different workbooks into 1 sheet. The codes may need some adjustment to avoid the below challenges: The problem are: 1. The sheets...
  15. M

    Mysterious workbooks.open crashes excel

    I have this wb with code in a module called LoopThroughFiles. I set it to a on click button event. One day, I open the file and click the button and it crashes. No reason. I go into the vba thingy and hit play. Still crashes. I copy the code into a new sub called hello() and press play on...
  16. N

    Search Multiple Files in Folder

    Hi, I have found the following and modified it a bit but need to modify it a little more for my needs. This allows the user to enter the search criteria and folder to be searched. It then goes through all files in that folder and identifies the files that contain the criteria being searched...
  17. G

    Sum several tabs

    i am trying to updated this VBA to now sum Column D and c start with D3 AND C3 in each spreadsheet that it opens and place the value in Column L AND M on the Sumarry_1 Tab. Currently it just copies the the second line in each sheet to the summary_1 tab inwhich i would like to keep. So basically...
  18. C

    DIR$ function unreliable?

    I am trying to get a macro to hyperlink to a folder while checking to see if a folder exists for the hyperlinked item. My problem is that the first DIR$ call is unreliable. Sometimes it works as written while other times it fails with a Runtime error '76' Path not found. Why would it work...
  19. G

    Save As VBA Code

    Hi. I have the below code that works fine to save my workbook as a PDF where the user specifies the location but the filename is specific. I now require if to still be an excel file. I would also like to add in to the code the ability to delete several of the worksheets within the new workbook...
  20. A

    VBA: Search all workbooks in folder for text and copy whole row to new sheet

    Hello, I'm trying to put together a VBA button to search all of the workbooks in a specified folder for a user inputted word in any cell (usually column A if that makes it easier). Once found I'd like it to copy the whole row to a new sheet in the Workbook the VBA is run from. Currently I have...

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