Email Selected Sheets Via Userform

Apr 3, 2014

I am trying to set up something similar to the old "print dialogue" box whereupon the user presses a command button on the userform and all sheets within the work book are listed (eg:sheet1, sheet2 etc) The user can select any amount of sheets and and using "OK" outlook is fired up- pretty similar to Ron de Bruins code for email.

I have tried taking the print dialogue vba and stooping it at copy, then trying to gets Ron's code to continue- without success.

There are great bits of code I've seen for select tabs and selct sheets from listbox, but I have found none to email once selected.

View 4 Replies


ADVERTISEMENT

Print To PDF Selected Sheets From An UserForm Listbox

Jun 13, 2006

I have created a custom Menu (excel add-in) to make my work easy in excel. My problem is to print only selected sheets from Workbook in one PDF file, for that I've created a Userform with 2 listboxes, add sheet and print buttons. In the first listbox are listed all the sheets and in the second listbox are the sellected sheets to be printed. What I've succeded so far is to print selected sheets, but it creates one PDF file for each sheet, only if I put my code in workbook and not in Menu add-in (.xla file). As PDF Printer I use PDF reDirect Pro v2.

View 8 Replies View Related

Send Email When Dropdown Value Selected?

Apr 30, 2014

What is the code for getting Excel to send an email once I close a line item? I got some code from another post but can't get it to work for me. My current spreadsheet is a list of outstanding problems. Once the issue is "Closed" (Dropdown in column U), I would like Excel to email a recipient who's address is in Column K. The issue is in the code - If c = "Closed" Then

Sub Closed()
'You need to Reference Outlook
'Goto Tools>References and select Microsoft Outlook Libary 9.0 (or your version)
Dim olApp As Outlook.Application

[Code].....

View 5 Replies View Related

VBA Code To Email Selected Items

Sep 22, 2008

I have the following code that carries out a selection and then brings up in a print preview.

View 13 Replies View Related

How To Send Email By Selected Name In A Cell

Oct 17, 2013

I have the following vba codes :-

Sub Mail_Cascavelle()
Range("b2") = Format(Date, "dd/mmmm/yyyy")
Const mydrive = "R:"
Const mydir = "Credit AdminSeebaruth RakeshSEARCHES NO SIGNATURE"
Dim myname As String
Dim ss As String
myname = Sheets("sheet1").Range("e5").Text & Format(Date, "dd-mmm-yy") & ".xls"
ss = mydrive & "" & mydir & "" & myname & ".xls"
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs Filename:=ss

[code]....

View 2 Replies View Related

Wrong Range Selected While Sending Email

Feb 25, 2010

I am wrote below code to send email using VBA:

Sub SendEmail()
'References needed :
'Microsoft Outlook Object Library
'Microsoft Scripting Runtime
Dim olApp As Outlook.Application, olMail As Outlook.MailItem
Dim FSObj As Scripting.FileSystemObject, TStream As Scripting.TextStream
Dim rngeSend As Range, strHTMLBody As String
Dim Range1 As Range, Range2 As Range
alertsSheet = ActiveWorkbook.Name
Workbooks(alertsSheet).Activate
Sheets("STATS").Select

Issue with this code is it is selecting wrong source range while generating email.

MsgBox Range1.Address is giving results as "$A$1:$B$1,$BX$1:$CA$1" and
MsgBox Range2.Address is giving results as "$A$32:$B$38,$BX$32:$CA$38" but
MsgBox rngeSend.Address is giving results as "$A$1:$B$38"

And the email generated as output is having only the data from range "$A$1:$B$38". Is there anything wrong with the way I am specifying the source range ??

I need that the code should replace strHTMLBody with the data in Range1 and Range2. I checked the tempsht.htm file and found that this file also have the same wrong data i.e. data from range "$A$1:$B$38"

Needless to specify that I am working with data having few hidden columns and need to consider only visible data.

View 9 Replies View Related

Send Data From Userform To Worksheet AND Send Userform Fields In Email?

Jul 12, 2014

I have used a database template from this site and changed it to suit my needs but I have a bit of a problem with some of the code. I know how to update the worksheet with the relevant userform text fields and in another project I did I have successfully sent userform text fields in the body of an email.

For this project I want to update the worksheet AND send an email at the same time. However, using the two pieces of code together is causing an error that I can't seem to solve (using my very limited vba knowledge!). The code I am working on is below and I have highlighted the line that is getting the error message. C

VB:
Private Sub cmdSubmit_Click() 'Submit new record
Dim ws As Worksheet, lRow As Long, Str As String [code]....

View 1 Replies View Related

VBA: Userform Sending Email

Jan 16, 2009

I'm working with an excel file, a userform and a command button. The command button is the main question here. Bascally when this button is clicked and email is sent to a specific person, me. This email also contains an attachment, and currently that is the active workbook open behind the userform. This works well, sort of. I sent this excel file to 5 co-workers to test. All but 1 worked OK. One, however, did not.

When the button was selected the standard Outlook message came up: "...an automated email is being sent on your behalf...select YES to continue..."...It all looks fine, but nothing happens...nothing shows up in their sent items folder and I do not receive this message.

Has anyone experienced this before? Is there a sitting with this users Outlook that prohibits the sending of automatic emails? I've added my command button code below...incase someone sees thing strange...(I am rather new to vba coding...)

View 4 Replies View Related

Userform Email Sent Items?

Jul 24, 2012

I've create a userform1 that sends information via email. I have seen userforms that do the same, but that after sending, the sent email doesnt show in the sent items from outlook.

The userform has 2 tectboxes and when the person sends the email the text from the second box comes right after the first one, no space or anything. How do I separate the text by space or paragraph.

View 2 Replies View Related

Email UserForm Macro

Dec 13, 2006

I have cobbled together a userform that works great, it prints, saves and clears as desired. Now i want to email a copy of the userform to a specific email receipiant.

View 4 Replies View Related

Email Address From Textbox On UserForm

Aug 11, 2006

I have a userform which shows contact information e.g. telephone and email.

The data for each contact is in a row in a sheet.

The email for each contact is a hyperlink which works as it should.

How can I use the address directly from the userform textbox?

View 9 Replies View Related

VBA Userform - When Submitted By Email The Attachment Is Blank.

May 5, 2009

I am very new to VBA and I am trying to create a userform which can be filled in and then when command button "submit" is clicked the completed form is emailed to myself. I have created the code for this but the userform is arriving as a blank attachment.

View 9 Replies View Related

VB Code To Email Separate Sheets

Jun 26, 2008

below is a VB code to email separate sheets based on sheet anme and email address on a sheet called " mail".

Code seems to fail at the last line " Next a" any ideas why this is not working

Sub Mail_sheets()
Dim MyArr As Variant
Dim last As Long
Dim shname As Long
Dim a As Integer
Dim Arr() As String
Dim N As Integer
Dim strdate As String
For a = 1 To 253 Step 3
If ThisWorkbook.Sheets("mail").Cells(1, a).Value = "" Then
Exit Sub

View 9 Replies View Related

Sum On Selected Sheets

Feb 12, 2008

I have a worksheet that has data for separate sheets for each date of the month.

Therefore, the month of January has sheets for 31 days.

I need to sum a particular cell in each sheets only for Monday.

Therefore, I need the formula to sum cell B4 only for the sheet for Jan 7, Jan 4,Jan 21 and Jan 28.

View 9 Replies View Related

Creating Email From Userform - Body Contain Content From Textbox

Jul 9, 2014

I am working on a code which works, however, its is not working entirely as i intended. In this example, the body of the email should contain content from textbox.

I have 3 text boxes, not all are expected to be filled out. So if only textbox1 is filled out, the body should only include information derived from textbox1.

Whats happening now is that even if textboxes 2 and 3 arent filled out, the body of email produces blank formulas from textboxes 2 and 3. So how do i fix this code so that if I enter data into textbox1 only, the body of email will not include empty formulas? Ive also attached a copy of the Produced email file. Code in question is in red font

Attached Image : 7-9-2014 11-21-35 PM.png

View 4 Replies View Related

Userform That Will Add Data To Specified Table And Send Email With Notification?

Feb 9, 2014

I need to make a userform that will add data to table placed (for example G12:H12), and if G13:H13 cells are written to next cells below (G14:H14). I would also want to receive auto email noticiation (or notofications by pressing another command_button) that someone add data with copied content of (G13:H13...G14:H14....) cells in email body.

View 1 Replies View Related

Email Sheets To Various Contacts In PDF And Also Excel (but Locked)

May 13, 2014

Work on a spreadsheet with multiple sheets , that will then be emailed once a month, with different sheets going to different contacts because of our timezone difference.

If a sheet could be used to maintain a list of contacts and which sheet to email out Also in which format PDF, Excel (locked down) or both would be useful.

A button maybe on the contact sheet to start the process / but also with an option to set-up to email on a certain day per month would be good.

the number of contacts at the moment varies between 1 and 4 for each sheet - perhaps , we could set-up to email up to 10 contacts per sheet

The email client is Outlook

Each contact should only receive their sheet and not see any of the other sheets , also the contacts should not be able to alter the spreadsheet at all. hence the possibility of using PDF , but most still would like to see the report in excel format.

there would be about 20 sheets , to go to between 1 and 10 contacts for each sheet

I have attached a dummy workbook , which has 4 example worksheets in

In the real workbook, the worksheet names , also will have spaces in them.

I could setup a Start Sheet and a finish sheet - so that the macro - can go through each worksheet in between , if that offers a solution also a maintenance sheet which has the sheet name , email contacts email address and PDF, Excel or both format.

I have outlook on my PC , so i can play - BUT its not connected via exchange server, if that makes any difference.

View 2 Replies View Related

Add Selected Items From One ListBox To Another On UserForm

Feb 27, 2014

I have a (MultiSelect) ListBox1 that is populated with Customer Names for the user to select from. I want the user to be able to hit the CommandButton1 adjacent to the ListBox1, and the selected Customers copy into/get added to the ListBox2.

I have the following code, adapted from other code, but it is not working:

[Code] ........

View 2 Replies View Related

Activate Userform When A Cell Is Selected

Dec 17, 2008

I have a user form containing a calendar. What I'm trying to do is that if any cells are selected in a range - D4:E83 - then I want to run the userform therein forcing the user to use the calendar and ensure the date is correctly formatted.
The userform is named frmCalendar.

View 5 Replies View Related

When Cell Selected Initiate Userform

Feb 25, 2009

I would like to have a userform activated when I select a specific cell "g77". I tried a code that I found while searching the forum but it did not work.

The userform name is ufMutualAid

I am not sure if it makes it any easier to write the code three times seperately or if I can put them together, but the same idea is needed for

L79 ufPersonnel
L81 ufApparatus

View 9 Replies View Related

Display Userform When Certain Cells Selected

Feb 24, 2009

I have created a Multipage Userform which I want to control the display when certain condition is met. I am using a button to call up this userform but I wanted to put some limitation to this form being displayed. This form will only be displayed when any of the cells in Column B Row 20 downwards or Column D Row 20 downwards are selected.

View 9 Replies View Related

Insert Userform Data Into Outlook Email Template Bookmark?

Jun 27, 2014

I can find code that allows me to open a word document and insert the value of a TextBox into the bookmark.

I have a bookmark in a OFT file (Outlook Template) and can't seem to make the same thing happen.

My question: Can you insert the value of a TextBox into the bookmark in the body of an email?

View 2 Replies View Related

Search Only Selected Sheets

Feb 1, 2007

I'm probably asking something very complicated in coding but I
was hoping someone could give me a macro code that would do a search
for a cell's input, but only search selected sheets.

example: "Please enter the word you are searching for here, and click the enter button:"

'here' would be cell C20. the value of cell C20 would be searched for on various
selected sheets written in the macro only.

View 12 Replies View Related

Copy Selected Sheets

Dec 18, 2008

I use the command ActiveWindow.SelectedSheets.Copy to copy selected sheets into a new workbook. As a result of this line is a new workbook created and a the selected sheets are pasted into the new workbook. Is it possible to paste only values by using a single line like this?

View 2 Replies View Related

Rename All Selected Sheets (For Each)

Apr 8, 2009

how I can change this code to apply to only the sheets that are selected (grouped) as opposed to every sheet in the workbook?

For Each shName In ActiveWorkbook.Sheets

View 9 Replies View Related

Matching Last / First Name From Two Sheets - Adding Email Addresses To Third Column

Jun 4, 2014

Have two sheets, both very different, but each containing Last Name, First Name and a column for email addresses (one sheet has the email addresses entered, the other does not)

What we are trying to do is look for matches in Last/First columns between the two sheets and if/when found copy the email addresses from one sheet to the other.

Worksheet A: Last=B2 First=C2 Email Address=F2
Worksheet B: Last=A2 First=B2 Email Address=C2

View 5 Replies View Related

Recall Last Selected Item In Userform Combobox?

Jul 5, 2014

I've created and coded a vba userform that creates purchase orders for my projects. The user begins by selecting the project code from the combobox (the project code is a unique identifier of each project). Once the purchase order is created, the information is logged in a separate sheet called "POLog" and the userform is cleared. The project code is saved in the first column of the "POLog".

My problem is that when I have more than one purchase order to create for the same project (sometimes I have 20 or 30), the combobox starts out empty and I have to manually select the project code from the combobox. Is there a way to allow the userform to recall the last project code that was used? Maybe recalling it from the last row in the "POLog" sheet?

View 7 Replies View Related

Counter In Userform - Increment If Checkbox Is Not Selected

Oct 17, 2011

I currently have a user form and am trying to make a counter to that will increment if the check box is not selected, but will not increment if the check box is selected.

I am assuming I could use an if then statement for this, under the command_click OK. but I cant get it to work.

View 9 Replies View Related

Automatically Call Userform When Cell Is Selected

Apr 26, 2013

I have some Worksheet_SelectionChange code that automatically calls a Userform when a cell is selected.

What I want to do is retrieve the data from the cell where the Userform is called from and enter it into a textbox on the Userform.

There are 3 other columns to the right of the cell that is selected.

If there is data populated there, I want this to be copied to the appropriate textboxes on the Userform too.

View 1 Replies View Related

Userform Listbox - Returning Selected Items

Feb 28, 2014

Returning items selected from a ListBox. I have a Multiselect Listbox with 15 items. Additionally, I have a worksheet with 15 columns (each one corresponding to the 15 ListBox items). I'm looking for code that will do the following:

After a user selects values from the ListBox (can be more than 1, thus the Multiselect), I would like for "TRUE" to appear in row 2 of the worksheet for each column. (IE: Column A is for Bikes, if a user selects "Bikes" from the ListBox and hits a CommandButton, I would like for A2 to say "TRUE".

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved