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 =...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 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.