The email macro I set up didn't work when I referenced the sendto from a cell in sheet 2; I changed it to reference an email address on sheet 1 and it worked with spacing errors. I need to fix the spacing errors, and I need to be able to pull the email from sheet 2. Code referencing sheet 2:
i have written a macro to parse data in to four columns using the text to columns fixed width option, but unfortunately the data i get changes its spacing and configuration every day, meaning that the fixedwidth columns dont separate the data correctly. below is how it looks some of the time.
I've been using a macro successfully for the last couple of years, but this morning when I went to use it, it decided to fail. I have a workbook which contains various spreadsheets. The macro that has failed performs the following tasks:
1. It copies a list of email addresss from an external workbook to a sheet in the current workbook (still works) 2. It copies the referral sheet I want to send to a new file, and saves it with an appropriate filename to an appropriate folder (still works) 3. The macro then creates an email with a standard subject line, attaches the new worksheet and emails it to each of the addresses as above (broken)
The error message is from Microsoft Visual Basic. "Run-time error '1004': Mail system failure. Check your mail installation."
I'm guessing there is a setting somewhere in Excel that has changed as part of an update.
I've been through a number of the options in the developer menu to remove any obvious restrictions (& reopened excel afterwards), but so far it hasn't resolved the problem.
For what it's worth, here is the macro code.
With Application .EnableEvents = False .ScreenUpdating = False End With Run "PullInSheet1" Dim oldbook As String
[Code] .......
In case you're wondering about the pullinsheet code, I'll add it below - but I probably grabbed it from this forum a couple of years ago (like some of the above) & just made some changes.
Code: Sub PullInSheet1() Dim AreaAddress As String '''''' Sheet11.UsedRange.Clear Dim ClRange As String ClRange = "= 'L:ADMINEMPLOY SERVICES" _
[Code] ........
There are a couple of things I've wanted to do to improve the macro, but I couldn't justify the need to spend time working it out (since writing spreadsheets isn't really my job). Since it's broken at the moment, I can...
1. I'd like to create a subject line that reflects the name of the person being referred. For some reason though, anything other than text in the cell reference caused an error for me. eg, I tried using concatenate to create my subject line, but it didn't work.
2. I'd like the copied sheet to contain all of the formatting of the original sheet. Presumably there is a paste option that will do this and I just picked the wrong one.
The mailsystem we use is Groupwise 8. I couldn't find any settings in that program that have been changed, or that I could change.
I should change the extension from xls to xlsx in the code since I'm using Excel 2010 (but changing it doesn't fix the problem).
I have an excel sheet that on the macro is saves and then sends a pdf via email. but outlook wants me to click to allow the application to send an email. Is there a way to bypass this?
I have built the following macro by but get the message 'For without Next' indicated on the End Sub line. I can't seem to figure out what the problem is using 'Help', any ideas on why this is tripping out?
I found the below code in one of the posts and it was working fine uptill few days back. now, i get the error Run Time error '-2147220975(80040211) The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
Sub CDO_Send_Workbook() Dim iMsg As Object Dim iConf As Object Dim wb As Workbook Dim WBname As String Application. ScreenUpdating = False Set wb = ActiveWorkbook WBname = wb. Name & " " & Format(Now, "dd-mm-yy h-mm-ss") & ".xls" wb.SaveCopyAs "C:/" & WBname Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults....................
I am using the code below to send emails from my Outlook Express. The code is working fine. Recently, I added additional email addresses into this code. When I did, I got an error message. The error message is below. Please help me modify this code or propose an alternative because I need to send out many emails. I prefer not to use Outlook unless I have got no choice....
I'am trying to send a single worksheet by copying it out of workbook and saving it, and after sending I want to delete the temporary file. But I get a Error message: 'Run-time error 438: 'Object doesn't support this property or method
Sub SendWeekrapport() Dim wb As Workbook Dim addr As Variant Dim bestand As String Call SelectWeekrap addr = Array("myname@mycompany.com") Application. ScreenUpdating = False ActiveSheet.Copy Set wb = ActiveWorkbook With wb .SaveAs Range("AG3").Value & "bestand" & Range("b2").Value & ".xls" 'amend to suit .SendMail addr, " Attached Timesheet for " & Range("B2").Value .ChangeFileAccess xlReadOnly.............
I've got a file that works fine on my computer. When I email it to anyone with 2010 and they open it from their email account (Outlook 2010), the file automatically opens up in 'Protected Mode'. If the user selects "Enable Editing" the user receives 'Run Time error 91: Object variable or with block variable not set'.
If the user closes out the vba error and saves the file to their computer and reopens the file, it works fine.
BTW, it is not a complex macro, it is error out at
I've set up an email to be sent via a macro (excel 2007 and outlook) and I expanded the body of the message and it now comes up with an error "Compile error: invalid outside procedure"
It was working when I only had 4 lines and now it's not working.
I have the below code that I would like for the data to fall in the exact same space underneath their proper headings. I cant create an html shot for specific reasons and so I am stuck with creating the table in this manner. Does anyone know how to on a single row to accomplish placing date so it looks like a table
10 spaces 20 spaces 30 spaces
that way the number will always fall on space number 10, 20 and 30 on same row
I have a list with fractions such as 25 1/4, 33 5/16, 20 15/16, etc. i have them formatted as FRACTIONS 2 DIGITS 21/25. Manny of those have double spacing ex: 25 1/2, So i am wondering if theres a way to take the extra spacing off the ones that have double.
I have alot of data with data and time in one column, and temperature in another. All my data is bunched together, i have temperature measurements every 3 minutes, 24 hours a day, for about a month... and then after that, i have temperature measurement 10 minutes a day, 24 hours a day for several months
I want to group my data by hour, so for my 3 minute measurements, 20 values make up one hour. And for my 10 minute measurements, 6 values make up one hour. I want to know if there is a way to space out my data so that it groups it/ spaces it out. So for the 3 minute values, it would list 20, then put say 3 blank rows, then 20 more values, then 3 blank rows etc.... and for the 10 minute values, it would be 6 values, then 3 blank rows, 6 values, then 3 blank rows etc...
In the below example each of the items listed in Row A have an extra space before the word, is there an easy way of taking that space out i've tried text to columns, paste special. Not sure what else can be done ...
I have a VBA excel file that pulls data from a CSV file downloaded from a link. I format this data into a table through excel and then copy it over to Outlook. This is where the problem is. I get a runtime error 4065 for "file is locked for editing".
What I need to do is have the numbers on the x axis count up with a even increment. For example, 1,2,3,4,5. That part is easy and I can do that, the next part is not.
Next I need the X axis of my graph to have, what the graph I'm trying to replicate calls, a "squared scale". So the numbers need to look like what is above but be spaced in squared intervals.
It would look something like this: 1 2 3 4 5... note the spacing between each is increasing.
Below are pictures showing how the book does it by hand.
I think I could get it to look like this with a dummy series with the axis labels listed but I need to be able to have a point read off the actual values so the dummy axis wont work.
I got a number, OK lets make it every even "5","10", "15" est and i add another one beside it to be added 0.01 every "5" times, so ok i'll make it a bit better some how,
I have a spreadsheet which contains 6000 rows where column A1 lists a name, B1 an address, C1 an amount and B2 the 4-digit zip code and place. Now I want to move the content of B2 to D1. I can't use offset because the spacing of the zipcode cell is not always the same.
if you look in Column G you will notice the number on the right side of the column is indented one space too many (for any number that is 6 long in column A).
Is there any way to do an IF C=6 and then have it remove a space from before the number in Column G to have it line up?
I am using excel as a base for formatting reports, and collating logical paragraphs, which I want to display in one massive merged cell on another worksheet.
The paragraphs are different for each report, and I do not wish to manually enter them in each time. I also want them to display as seperate paragraphs on the page, but in the same cell.
To throw a spanner in the works, the paragraphs are all of indeterminate length, otherwise, I could use different cells. If I combine them in the massive merged cell by using =cell1&cell2&cell3 then they will just appear merged as one whole huge paragraph. I want them to appear as separate paragraphs in the same big cell.
I have been able to produce a column that gives me key date information. I might have many empty cells in that column before it hits another date. I need to get this data over to another sheet and place it in a row.
I am trying to get it to look like this:
B2(value), C2(value),D2(blank),E2(Value),F2(Value),G2(blank) etc depending on how many more elements are found in the sheet.
I am able to find topics that allow me to copy a range of data but not one that will allow me to copy a range then skip a cell.
I've been trying to get a graph that looks like the image below for a while now and can't seem to get it to appear how I want. I am looking to duplicate it exactly, but the issue I'm having is getting the individual bars to be separate and appropriately spaced.
I have a pivot table with dates along the x-axis. The data is spread out over 5 years and the spacing between sampling events is not even, therefore, the spacing of my x-axis dates is not even. I want the x-axis to look similar to a normal graph where there is equal space between each month, even if I don't have data for each month. I do not want to group the data to accomplish this. If I click the "show items with no data" it only shows one extra day, not all days or even all months. I have excel 2010.