Emailing A Single Sheet
Feb 24, 2007I have an icon in excel that i would like to attach a macro to and send sheet 2 to a specific email address.
View 4 RepliesI have an icon in excel that i would like to attach a macro to and send sheet 2 to a specific email address.
View 4 RepliesI have an original workbook that I use daily stored in a folder called 'Live'. I also have this same workbook saved in a different folder call 'In Progress' because I am constantly improving and making changes to it. While I'm in the revision mode, I keep it in this folder. Once I've completed my revisions, I move it to the folder where the live workbook is located and replace the old version. Therefore, I have two copies of the workbook at all times. The name of the workbook in both folders is the same (IRQT)
I have a macro in this workbook that will allow you to save a copy of the workbook in a folder called IRQTArchive. The macro will create the folder if it doesn't exist, then store a copy of the workbook using a name in a cell. After that is complete it renames the workbook back to the original name (IRQT).
This macro works perfect in my live version, but when I execute the macro in the 'In Progress' version, I get a Compile error: Sub or Function not Defined when it reads the dirExists command in the first line of code. The code in both sheets is identical. Here are the first few lines of code. The command dirExists is highlited in yellow when it errors out.
I put together some code in a frankenstein fashion to have a report sent to different people based on the sheet name.
I am trying to automate this so that the macro looks at each sheet name and then converts the sheet to a PDF, attaching and sending an email to the relevant person.
However I have run into a referencing issue whereby it does not pick up the data from each sheet. I'm guessing this is to do with the way I have used ActiveSheet or sh but I have not figured it and really need a fresh pair of eyes on it.
It should be looking at each sheet in turn but instead it is taking the data from the activesheet and duplicating this based on the number of worksheets in the workbook.
I am using a macro to e-mail any work sheet with an address in A1. I would also like to attach a file that will be listed in cell E1 of that worksheet. The file is different for each work sheet that is being sent but will be listed in the same cell of each work sheet.
This is the code I am using (i got it from ron de bruin) when I use the .Attachments.Add (C:est1.txt) it works but i can not seem to figure out how to get it to read the file address in the E1 cell. The code i am trying to use is .Attachments.Add = ws.Range("E1").value.
i have two sheets, one to display results (Reults tab) & the other tab containing the data (Data tab)
what i am trying to do is some how create a search function and have a forumula which contains a LIKE function that looks up the data table
RANGE = Data!A2:K255
the search needs to lookup the primary column Data!B2:B255 ... if any results are found .. show them on the results tab.. and if multiple results are found, display those as well.. (in either instance, the whole row of information in respect to the results need to be dislayed and hopefully no duplicates are found .. eg, Data!A:K of a hit)
is there a formula that can achieve this? oh, the search is TEXT based and there should be no empty cells within the dataset
after some MASSIVE googling, i have stumbled accross this
B1 = Search box (txt field)
A6 (which will be a hidden column) contains =MATCH($B$1,Data!A2:A255,0). this formula provides the first instance of the result and provides the row number
A7 contains =MATCH($B$1,OFFSET(Data!$A$1,A6+1,0,8-(A6+1),1),0)+A6.
this is supposed to look for the next row number which contains a match and provide that row number
and througout my other columns, i have
B6=OFFSET(Data!$A$1,A6,1)
B7=OFFSET(Data!$A$1,A6,2)
B8=OFFSET(Data!$A$1,A6,3)
and so on
2 things i cannot recitify..
1, the match has to be EXACT ... unfortunately i cannot use exact .. needs to be LIKE .. eg, i cant use the search word "boat" as the range of data has "boats"
2, it comes up with multile .. irrelevent results.
I've workbook contain Sheets 2716 having same column heading data in each sheet in 1st Row, also having some columns blank in between these heading so can you give me solution on it on the basis of column heading names below data in single sheet of all these sheets data.
Heading names as below
Product Name
Amount
sr no
DS
TS
Description
Qty
How I solved my problem of sending out information to more than one email recipient using Lotus notes email and Excel 2003 vb code. I created groups in Lotus Notes for those with more than one email address Then I assigned a string to vaRecipient like so:
.SendTo = vaRecipientThe string was either one email address or a lotus notes group name.
Dim wb As Workbook
Set wb = ActiveWorkbook
wb.SendMail "person@address", _
"This is the Subject line"
and this seems to work fine. Could there be any potential problems with this? All senders and recipients should be using outlook. Also is there a way to send the workbook but lose any macros attached. I'm not sure that all recipients will be able to receive workbooks containing macros.
I am attaching workbooks which reflect my original work. I have some questions :
1. How can I allow users to view this with everything working fine? (zipping and emailing was suggested, but I am getting some errors)
2. How can I ensure that the viewing format remains same for everyone viewing it?Al colleague of mine, tried and the formatting is wierd for him
Does any want know how to do the following:
1. In the same Workbook, I have one sheet with email addresses.
2. On Sheet 1, in Cell D3, I have the actual email address I want to send(Used data validation drop-down to get email address)
3. I´ve used many codes and it sends very well, however it does not send the email as a fully functioning workbook.
4. The recipient gets the following message "This book contains links to other sources"
I have a spreadsheet that I email daily after I update the information in it.
I was unable to find a "Code" to do so when I wrote it so what I did instead is use the Sendkeys funtion to emulate the keystrokes as if I were doing it manually. This works well with one exception.
I now have 5 email accounts and I do NOT want it to email via the default. I need to SPECIFY wich account to email thru. But I can ot figure out how to do this.
Sub Email()
' EMAIL Macro
ActiveWorkbook.Save
Application.DisplayAlerts = False
Windows("Load List.xls").Activate
Sheets("email").Visible = True
Sheets("email").Select
Range("a1").Select
SendKeys ("%f")
SendKeys ("d")
SendKeys ("m")
Application.DisplayAlerts = True
ThisWorkbook. Saved = True
How to email a single SHEET with formulas who get it's data from other sheets.
The receiver must get an Excel Sheet with data not formulas.
How you do that ?
I have a series of combo boxes which change values in a table. I have multiple versions of the same combo box on different sheets, linked to the same cell.
On ONE of the sheets where these comboboxes reside I would like to display a warning message that when changed, the following tables have also changed.
I have the message box working fine on different choices, great.
However when the combobox is changed from another sheet, the message pops up. I only want to show this box on a single sheet. I have the message box running from a copy of the drop list on the sheet specied using the worksheet_calculate function in vba.
When I attach a 1 page spreadsheet to an email and send it to my boss, the spreadsheet is no longer on one page when he opens it. What causes this and how can I fix it on my end or fix it from his end to keep the same format?
View 2 Replies View RelatedAdd worksheet as an attachment to an outlook email by having a button on the spreadsheet itself. However I have added another worksheet which i would like to add to the same email ie 2 attached worksheets to the same email this being decontamination certificate. I have tried to do this myself by copying and pasting some of the code and changing the paths and name but all I get is one or the other or the wrong name to the worksheet.
View 10 Replies View RelatedI am trying write one to search a range of cells and attach all files located in those cells to an email. I can get most of the code to work, but am having difficult getting it to search through specific cells.
View 14 Replies View RelatedI found this link in numerous places on this forum to email just a single worksheet from a workbook using one macro.
HTML Code: ....
I am trying to set my cod up so I can email my excel sheet to multiple people. I tried using a ";" to separate the email addresses (as shown below) but that doesn't seem to work.
With ActiveWorkbook    .SendMail Recipients:="bubba@gmail.com;bubba2@gmail.com", Subject:=s    .Message = m    .Close SaveChanges:=False    End With
Refining the below code which repeats itself for 60 agents per worksheet, for 7 worksheets. Is there a way to loop the code so it counts up 68 cell references until the 'blank cell' condition is met?
[code]'## Agent 1
If Sheets("CSR Dashboards").Range("M3").Value = "" Then sResult = MsgBox( _
Prompt:="CSR Dashboards have been sent.", _
Buttons:=vbOKCancel)
If sResult = vbOK Then
[Code] ........
I am trying to get a macro to automatically email my workbook out to my distribution list. I have it working but I get a popup telling me:
"A program is trying to automatically send an email on your behalf.
Do you want to allow this?"
Is there anyway I can bypass this message? The code I am using is below:
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "mbudgell@hotmail.com"
.CC = ""
.BCC = ""
.Subject = "NAME"
.Attachments.Add ActiveWorkbook.FullName
.HTMLBody = MyHTML & "Hi,
I have a new request concerning my warehouse managing.
I am getting back to this thread [URL]....
The request is as follows: When having the list of all the shelves, I'd need to create a new sheets with following data in a single column
shelfcodequantity
reporting in order all the shelves with code and quantity.
My idea is as follows:
1 - to create a sheet with all the shelves
2 - to create a function that reads in this sheet the name of the first shelf, then searches in other sheets the shelf and copies to a result sheet all the records found
3 - then passes to the following shelf name
4 - and so on, until the shelves lists ends.
Please note that in each sheet I have these data in two columns.
I am here attaching you an example
My problem is this:
How to tell in VB to realize step 2 ?
The code below enables entire workbook protect/unprotect, however ultimately it refreshes a particular sheet (sheet 8 in this instance) when the relevant data table is edited.
I have 7 sheets (one is the data table and the other 6 house pivots that work off this data table). What I want to happen is for the code to enable the unprotect, refresh and protect of all the sheets exactly like it does for the current sheet 8 (I am simply new to this an am unsure of how to write the code to make the refresh happen for all sheets).
[Code] .....
I have inserted the following code in the 'ThisWorkbook' section to allow for to sheet protection macro to work:
[Code] ......
Along with the following code in the sheet 8 section to enable the refresh macro to work:
[Code] .....
I have a spreadsheet that has approx 10 different sheets (tabs at the bottom). I want to write a routine that will take one of the sheets, copy it to a new workbook, and email the newly created workbook using Outlook.
I've entered this question once before and got some suggestions that seemed to work for a while. Then it became hit and miss as to whether it worked or not. Now I'm geting a "Can't create object" error everytime. I want to break this one sheet out and send only it because I don't want to send the entire workbook.
There are multiple tabs in my workbook ("Template", "Database", and "Summary"). I would like to add a "Save to file" button on the "Template" sheet and it will dump a copy of this sheet only using the data on cell C4 and C7 as filename, not the entire workbook.
View 9 Replies View RelatedI can find tons of examples to merge many worbooks into one workbook(retaining all sheets) but I would like to merge to one continuous sheet.
example:
Folder c:excel containes 5-10 workbooks. Merge sheet2 of all workbooks in that directory to sheet1 of new workbook.
All sheet2's have same name of "Sheet2" and all have same fields. Also there are no blank rows but each contains different # of rows and plz dont say JFGI (just __ google it) I have been.
Is there any way to automate the calculation of a single sheet? IE to calculate when moving from cell to cell after entering data without calculating the whole workbook and any other open workbooks.
View 9 Replies View RelatedI need to know how to send an email from Outlook using a rather large email address list (500 addresses) that resides in Excel.
Also, I need to know how to hide the individual recipients and send it out under a title name. I want all of the recipients to see the title name only - and not each other.
I am building a weekly email to my clients giving them some data on their account. When i send through file-> Share as html email, the formatting gets all screwy.
View 2 Replies View RelatedI've created a userform below and I have a code to write the data entered in the form do the following:
1. Save the data in a worksheet (Asset History) within the same workbook,
2. Copy the newly entered data into a another worksheet (Asset Form).
3. Take an image of the data from worksheet (Asset Form) and
a) Create a HTML image on out look
b) Send out an email (Get the email distribution from worksheet (EmailList)
4. I also want to be able to select the data nad change if any of the information changes using the userform.
Not sure why my code is getting stuck and getting the attached error "1004" when I get to saving and emailing. My guess is that the error is on the Checklist option explicit but I cants fix.
Here is the full coding
Private Sub cmdsave_Click()
Dim cell As Range
Dim rowoffset As Integer
[Code]..............
I have a workbook with several sheets- lets call it MyWorkbook (The VBA Project should be locked so no one can view code). What I need is to run a code from MyWorkbook to make a copy of this – call it NewWorkbook. Now in NewWorkbook I need to hide sheets Kong,Bong and Dong……then save it as ‘Workbook name’& Date & time. Then email NewWorkbook. (I don’t want to keep any copy of NewWorkbook)
After that I need to Save MyWorkbook (so basically MyWorkbook keeps getting updated with new info everyday, and there are no hidden sheets)
VBA Codes should be password protected in both workbooks. I tried to write the email code , this is what I have so far.