![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 232
|
Hi,
I've used the following code (partly from a previous posting) to send my sheet via email to a specfic user. What I would like to know is how to use an input box to send the sheet to who ever the user want to. Creating the Input Box is easy, it's how I define a variable that I don't know. Thanks Range("A1").Select Selection.CurrentRegion.Select Selection.Copy Workbooks.Add ActiveSheet.Paste Application.CutCopyMode = False ActiveWorkbook.SendMail Recipients:="matthew.rowe@tmp.com", Subject:="PIPELINE", ReturnReceipt:=True MsgBox "Your Request Has Been Sent", , "MESSAGE" ActiveWindow.Close Sheets("Enter_NEW_Record").Select Range("D17:F17").Select End Sub |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Quote:
This does not check to see if the user has put in a valid email address, but it does check to make sure the user put in something. Then instead of "Martin.Rowe@tmp.com" you would put in:
HTH |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 232
|
Thanks alot! It works a treat.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|