#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
messagebox macro Patrick Bateman Excel Programming 1 November 27th 07 01:26 PM
messagebox help SDH Excel Programming 2 April 19th 07 02:34 AM
MessageBox Assistant SDH Excel Programming 4 April 19th 07 01:20 AM
messagebox help jimE Excel Programming 3 November 3rd 06 07:49 PM
Printing messagebox nc Excel Discussion (Misc queries) 1 March 22nd 05 02:49 PM


All times are GMT +1. The time now is 05:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"