Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MessageBox
Hi-
I have a macro which sends an e-mail of a report to a certain person which is triggered by a command prompt. My problem is that I would like to give my user the option of who they want to send it to. I have thought about a MessageBox with a text field which would be connected to the macro but I don't know if this is possible? Any ideas? Thanks, Orla |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
MessageBox
An input box or text box should be fine. Can you post some of your current
code and someone will surely be able to tell you what variable to use and where to put it into your code. OrlaLynch wrote: Hi- I have a macro which sends an e-mail of a report to a certain person which is triggered by a command prompt. My problem is that I would like to give my user the option of who they want to send it to. I have thought about a MessageBox with a text field which would be connected to the macro but I don't know if this is possible? Any ideas? Thanks, Orla -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200808/1 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
MessageBox
Thanks for your reply. I don't have code for a message box/input box yet but
this is how I am currently sending the email: ThisWorkbook.Sheets("Report").Copy With ActiveWorkbook .SendMail ", Subject:="DAS Report " & Format(Date, "dd/mmm/yy") .Close SaveChanges:=False End With I hope you can help, Thank you. "dustinbrearton via OfficeKB.com" wrote: An input box or text box should be fine. Can you post some of your current code and someone will surely be able to tell you what variable to use and where to put it into your code. OrlaLynch wrote: Hi- I have a macro which sends an e-mail of a report to a certain person which is triggered by a command prompt. My problem is that I would like to give my user the option of who they want to send it to. I have thought about a MessageBox with a text field which would be connected to the macro but I don't know if this is possible? Any ideas? Thanks, Orla -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200808/1 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
MessageBox
Dim emailAddress As String
emailAddress = InputBox("Input Email Address you'd like to send", "Email Address") With ActiveWorkbook .SendMail Recipients:=emailAddress, Subject:="DAS Report " & Format(Date, "dd/mmm/yy") .Close SaveChanges:=False End With Should work? Haven't tested it but will allow you to input an email address and then use it in the SendMail Function (never used that before). Hope this helps "OrlaLynch" wrote: Thanks for your reply. I don't have code for a message box/input box yet but this is how I am currently sending the email: ThisWorkbook.Sheets("Report").Copy With ActiveWorkbook .SendMail ", Subject:="DAS Report " & Format(Date, "dd/mmm/yy") .Close SaveChanges:=False End With I hope you can help, Thank you. "dustinbrearton via OfficeKB.com" wrote: An input box or text box should be fine. Can you post some of your current code and someone will surely be able to tell you what variable to use and where to put it into your code. OrlaLynch wrote: Hi- I have a macro which sends an e-mail of a report to a certain person which is triggered by a command prompt. My problem is that I would like to give my user the option of who they want to send it to. I have thought about a MessageBox with a text field which would be connected to the macro but I don't know if this is possible? Any ideas? Thanks, Orla -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200808/1 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
MessageBox
That worked perfectly!
Thank you very much! "NateBuckley" wrote: Dim emailAddress As String emailAddress = InputBox("Input Email Address you'd like to send", "Email Address") With ActiveWorkbook .SendMail Recipients:=emailAddress, Subject:="DAS Report " & Format(Date, "dd/mmm/yy") .Close SaveChanges:=False End With Should work? Haven't tested it but will allow you to input an email address and then use it in the SendMail Function (never used that before). Hope this helps "OrlaLynch" wrote: Thanks for your reply. I don't have code for a message box/input box yet but this is how I am currently sending the email: ThisWorkbook.Sheets("Report").Copy With ActiveWorkbook .SendMail ", Subject:="DAS Report " & Format(Date, "dd/mmm/yy") .Close SaveChanges:=False End With I hope you can help, Thank you. "dustinbrearton via OfficeKB.com" wrote: An input box or text box should be fine. Can you post some of your current code and someone will surely be able to tell you what variable to use and where to put it into your code. OrlaLynch wrote: Hi- I have a macro which sends an e-mail of a report to a certain person which is triggered by a command prompt. My problem is that I would like to give my user the option of who they want to send it to. I have thought about a MessageBox with a text field which would be connected to the macro but I don't know if this is possible? Any ideas? Thanks, Orla -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200808/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
messagebox macro | Excel Programming | |||
messagebox help | Excel Programming | |||
MessageBox Assistant | Excel Programming | |||
messagebox help | Excel Programming | |||
Printing messagebox | Excel Discussion (Misc queries) |