Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Is it possible excel send out an e-mail when certain
conditions are met? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Hi Mukesh
http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Thank you Rob....I will test it out and post back if
I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Click on the reset button in the VBA editor and be sure that you change the macro name in the change event
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Rob,
Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Please read the information on the CDO page if you want to use this macro
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Hi Mukesh
I too have had the problems you are having and although have read the info Ron advised am still none the wiser as to what I am doing wrong - how did you sort this out please? -- Thanks Lise (Aussie) "Mukesh" wrote: Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#10
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Hi Lise,
I just saw your request, hope you have sorted out, if not hereunder is the code that works well, the only problem is that I have to run the macro to send e-mail, whereas I want e-mail to be sent out automatically once the cell values have changed. Haven't had time to sort that out, but if you or anyone knows, please advise. Copy/paste to vb, change e-mail settings/password which I am sure you know or can find in outlook. Sub Mail_CDO() Dim iMsg As Object Dim iConf As Object ' Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds ..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.com" ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ..Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 ..Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "LoginID" ..Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "123456" .Update End With With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = """Sender's Name"" " .Subject = "Your Subject goes here - This is Subject Line" .TextBody = "This is the main body" & vbNewLine & vbNewLine & _ "Message goes here - Cell A1 value has changed" .Send End With Set iMsg = Nothing Set iConf = Nothing End Sub Thanks. Mukesh "Lise" wrote: Hi Mukesh I too have had the problems you are having and although have read the info Ron advised am still none the wiser as to what I am doing wrong - how did you sort this out please? -- Thanks Lise (Aussie) "Mukesh" wrote: Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#11
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
See
http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Hi Lise, I just saw your request, hope you have sorted out, if not hereunder is the code that works well, the only problem is that I have to run the macro to send e-mail, whereas I want e-mail to be sent out automatically once the cell values have changed. Haven't had time to sort that out, but if you or anyone knows, please advise. Copy/paste to vb, change e-mail settings/password which I am sure you know or can find in outlook. Sub Mail_CDO() Dim iMsg As Object Dim iConf As Object ' Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "LoginID" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "123456" .Update End With With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = """Sender's Name"" " .Subject = "Your Subject goes here - This is Subject Line" .TextBody = "This is the main body" & vbNewLine & vbNewLine & _ "Message goes here - Cell A1 value has changed" .Send End With Set iMsg = Nothing Set iConf = Nothing End Sub Thanks. Mukesh "Lise" wrote: Hi Mukesh I too have had the problems you are having and although have read the info Ron advised am still none the wiser as to what I am doing wrong - how did you sort this out please? -- Thanks Lise (Aussie) "Mukesh" wrote: Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#12
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Thank you Ron.
I have following code in module 2, what could be wrong as it doesn't work. Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Target.Cells.Count 1 Then Exit Sub On Error GoTo EndMacro If Not Target.HasFormula Then Set rng = Target.Dependents If Not Intersect(Range("A6"), rng) Is Nothing Then If Range("A6").Value < 100 Then Mail_CDO End If End If EndMacro: End Sub Is it possible to have a pop up message to say that the e-mail is sent/being sent or is not sent due to an error or something like that. Thanks. Mukesh "Ron de Bruin" wrote: See http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Hi Lise, I just saw your request, hope you have sorted out, if not hereunder is the code that works well, the only problem is that I have to run the macro to send e-mail, whereas I want e-mail to be sent out automatically once the cell values have changed. Haven't had time to sort that out, but if you or anyone knows, please advise. Copy/paste to vb, change e-mail settings/password which I am sure you know or can find in outlook. Sub Mail_CDO() Dim iMsg As Object Dim iConf As Object ' Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "LoginID" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "123456" .Update End With With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = """Sender's Name"" " .Subject = "Your Subject goes here - This is Subject Line" .TextBody = "This is the main body" & vbNewLine & vbNewLine & _ "Message goes here - Cell A1 value has changed" .Send End With Set iMsg = Nothing Set iConf = Nothing End Sub Thanks. Mukesh "Lise" wrote: Hi Mukesh I too have had the problems you are having and although have read the info Ron advised am still none the wiser as to what I am doing wrong - how did you sort this out please? -- Thanks Lise (Aussie) "Mukesh" wrote: Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#13
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Read good, not in a normal module
1) Right click on a sheet tab and choose view code 2) Paste one of the events in this module. 3) Alt-Q to go back to Excel -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Thank you Ron. I have following code in module 2, what could be wrong as it doesn't work. Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Target.Cells.Count 1 Then Exit Sub On Error GoTo EndMacro If Not Target.HasFormula Then Set rng = Target.Dependents If Not Intersect(Range("A6"), rng) Is Nothing Then If Range("A6").Value < 100 Then Mail_CDO End If End If EndMacro: End Sub Is it possible to have a pop up message to say that the e-mail is sent/being sent or is not sent due to an error or something like that. Thanks. Mukesh "Ron de Bruin" wrote: See http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Hi Lise, I just saw your request, hope you have sorted out, if not hereunder is the code that works well, the only problem is that I have to run the macro to send e-mail, whereas I want e-mail to be sent out automatically once the cell values have changed. Haven't had time to sort that out, but if you or anyone knows, please advise. Copy/paste to vb, change e-mail settings/password which I am sure you know or can find in outlook. Sub Mail_CDO() Dim iMsg As Object Dim iConf As Object ' Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "LoginID" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "123456" .Update End With With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = """Sender's Name"" " .Subject = "Your Subject goes here - This is Subject Line" .TextBody = "This is the main body" & vbNewLine & vbNewLine & _ "Message goes here - Cell A1 value has changed" .Send End With Set iMsg = Nothing Set iConf = Nothing End Sub Thanks. Mukesh "Lise" wrote: Hi Mukesh I too have had the problems you are having and although have read the info Ron advised am still none the wiser as to what I am doing wrong - how did you sort this out please? -- Thanks Lise (Aussie) "Mukesh" wrote: Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#14
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
It worked.
Thank you very much. Rgds, Mukesh "Ron de Bruin" wrote: Read good, not in a normal module 1) Right click on a sheet tab and choose view code 2) Paste one of the events in this module. 3) Alt-Q to go back to Excel -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Thank you Ron. I have following code in module 2, what could be wrong as it doesn't work. Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Target.Cells.Count 1 Then Exit Sub On Error GoTo EndMacro If Not Target.HasFormula Then Set rng = Target.Dependents If Not Intersect(Range("A6"), rng) Is Nothing Then If Range("A6").Value < 100 Then Mail_CDO End If End If EndMacro: End Sub Is it possible to have a pop up message to say that the e-mail is sent/being sent or is not sent due to an error or something like that. Thanks. Mukesh "Ron de Bruin" wrote: See http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Hi Lise, I just saw your request, hope you have sorted out, if not hereunder is the code that works well, the only problem is that I have to run the macro to send e-mail, whereas I want e-mail to be sent out automatically once the cell values have changed. Haven't had time to sort that out, but if you or anyone knows, please advise. Copy/paste to vb, change e-mail settings/password which I am sure you know or can find in outlook. Sub Mail_CDO() Dim iMsg As Object Dim iConf As Object ' Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "LoginID" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "123456" .Update End With With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = """Sender's Name"" " .Subject = "Your Subject goes here - This is Subject Line" .TextBody = "This is the main body" & vbNewLine & vbNewLine & _ "Message goes here - Cell A1 value has changed" .Send End With Set iMsg = Nothing Set iConf = Nothing End Sub Thanks. Mukesh "Lise" wrote: Hi Mukesh I too have had the problems you are having and although have read the info Ron advised am still none the wiser as to what I am doing wrong - how did you sort this out please? -- Thanks Lise (Aussie) "Mukesh" wrote: Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
#15
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel file sending an e-mail, is possible?
Ron,
I have streaming prices in excel and I have set to receive an e-mail when a certain value on a particular cell is reached, unfortunately it doesn't work (its a formula cell (adds few cells), I am using the 2nd option from your site). However, when I manually input numbers and set to receive an e-mail, it works!! what could be wrong, is it because of live prices? is there a way to fix. Thanks. Mukesh "Mukesh" wrote: It worked. Thank you very much. Rgds, Mukesh "Ron de Bruin" wrote: Read good, not in a normal module 1) Right click on a sheet tab and choose view code 2) Paste one of the events in this module. 3) Alt-Q to go back to Excel -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Thank you Ron. I have following code in module 2, what could be wrong as it doesn't work. Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Target.Cells.Count 1 Then Exit Sub On Error GoTo EndMacro If Not Target.HasFormula Then Set rng = Target.Dependents If Not Intersect(Range("A6"), rng) Is Nothing Then If Range("A6").Value < 100 Then Mail_CDO End If End If EndMacro: End Sub Is it possible to have a pop up message to say that the e-mail is sent/being sent or is not sent due to an error or something like that. Thanks. Mukesh "Ron de Bruin" wrote: See http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Hi Lise, I just saw your request, hope you have sorted out, if not hereunder is the code that works well, the only problem is that I have to run the macro to send e-mail, whereas I want e-mail to be sent out automatically once the cell values have changed. Haven't had time to sort that out, but if you or anyone knows, please advise. Copy/paste to vb, change e-mail settings/password which I am sure you know or can find in outlook. Sub Mail_CDO() Dim iMsg As Object Dim iConf As Object ' Dim Flds As Variant Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1 ' CDO Source Defaults Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "LoginID" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "123456" .Update End With With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = """Sender's Name"" " .Subject = "Your Subject goes here - This is Subject Line" .TextBody = "This is the main body" & vbNewLine & vbNewLine & _ "Message goes here - Cell A1 value has changed" .Send End With Set iMsg = Nothing Set iConf = Nothing End Sub Thanks. Mukesh "Lise" wrote: Hi Mukesh I too have had the problems you are having and although have read the info Ron advised am still none the wiser as to what I am doing wrong - how did you sort this out please? -- Thanks Lise (Aussie) "Mukesh" wrote: Hi Rob, It took me nearly 3 hours, and finally figured out what wrong I was doing....its working now. Thanks a lot. On to my project. Thanks. Mukesh "Ron de Bruin" wrote: Please read the information on the CDO page if you want to use this macro -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, Now I am getting an error " The "SendUsing" configuration value is invalid ". .....can fix? Thanks. Mukesh "Ron de Bruin" wrote: Click on the reset button in the VBA editor and be sure that you change the macro name in the change event -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Rob, I am using example 1 from your site....and while running the macro, I get an error "Can't execute code in break mode", sorry don't understand, how do I fix it. Thanks. Mukesh "Mukesh" wrote: Thank you Rob....I will test it out and post back if I encounter any problems. Thanks. Mukesh "Ron de Bruin" wrote: Hi Mukesh http://www.rondebruin.nl/mail/change.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mukesh" wrote in message ... Is it possible excel send out an e-mail when certain conditions are met? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sending an excel attachment in an e-mail | Excel Discussion (Misc queries) | |||
sending mails from excel...but mail body disappearing | Excel Discussion (Misc queries) | |||
Sending One Cell Through Mail from Excel | Excel Worksheet Functions | |||
Sending an e-mail from the Excel or Word toolbar | Excel Discussion (Misc queries) | |||
General mail failure when sending e-mail from Excel | Excel Discussion (Misc queries) |