Posts by yht

    Re: sendmail on Windows XP

    Hi Roy,

    my colleague is using XP operating sys, Office 2003. it seems he still has the problem i.e. did not execute "sendmail" and go directly to "xxx"

    on error goto xxx
    activeworkbook.sendmail cEmail, cComments

    he is using Outlook Express as the email client and Outlook Express is open when the macro is running.

    I simulated the scenario using the same environment but is working fine. Any idea what cud have caused the error?

    Have also checked that under Internet Explorer, the email program is set as "Outlook Express"

    My colleague tried the macro on a non-XP PC using Outlook Express and has no problems.

    Wud appreciate your valuable advise.


    Re: sendmail on Windows XP


    I think in order for sendmail to work, the email client (i.e. either Mricrosoft Outlook or Outlook Express need to be loaded first)?

    If the email client is not loaded, the sendmail will not work in the Windows XP environment (i think)?

    initially, my colleague tested the sendmail macro in the Windows XP PC, there is a "on error" command prior to the "sendmail" as follows:

    1. on error goto xxx
    2. sendmail cEmail, cComments

    and the program did not execute the sendmail command and go direct to xxx

    After I loaded Outlook, then the macro start to work.

    Is this correct?

    Is there a way to load the email client (if it is not already loaded) prior to executing the sendmail command?



    the command used is:

    1. activeworkbook.sendmail cMail, cSubj
    2. 'cMail contains email address
    3. 'cSubj contains email Subject

    the abv works well with Windows 2000 OS but gives an error in the Windows XP environment.

    Cud not trap the error (using msgbox error(err)) so not sure what causes error.

    any advise wud be greately appreciated.

    Re: macro runtime error '1004' general mail failure


    the code is something like this:

    1. ActiveWorkbook.SendMail Range("m41").Value, txtcomments
    2. 'where m41 contains the email address
    3. 'txtcomments stores the Subject Heading
    4. on error resume next


    the error only occurs when I reply "No" to "A program is trying to automatically send email etc... "

    when I reply yes, everything proceeds as normal i.e. email
    was sent and file is properly closed.



    i am trying to use active.workbook.sendmail in my macro to send a workbook.

    it pops up a window that says "A program is trying to automatically send emails on your behalf.... etc."

    when i reply "yes", the program runs and terminates normally. when i reply "no", "a runtime error '1004' general mail failure" occurs.

    excel.exe remains in the memory and when i try to open the excel spreadsheet again, it shows "file in use" and I need to go to task manager to end the process.

    tried "on error resume next" but dont seem to work.

    wud greatly appreciate assistance on this matter.

    my objective is to trap the error and allow excel.exe to be released from memory and the program to close normally without error.


    Re: How Do I Disable A Warning Popup?

    Hello all,

    i have this similar problem of the popup "A program is attempting to send a mail on my behalf etc".

    when I reply "Yes", everything proceeds smoothly. when i reply "no", an error is displayed and the program is terminated improperly and the file is locked.
    (i.e. need to use file manager to release the file, else
    will show file in use)

    have tried onerror to trap the error but failed.

    wud appreciate some guidance on how to get around
    this problem.

    thks/rgds yht

    Quote from PARKERDJ

    Hello All,

    I have a macro setup that automatically emails numerous workbooks to the relevant contact etc.

    However, everytime I run the macro I keep getting a Popup window stating that "A program is attempting to send a mail on my behalf etc". Does anyone know how to turn it off please?

    Re: Dynamic Link to worksheet

    Thank-you very much for the reply. Have tried the indirect function and it works but the other spreadsheet must be open (as u rightly say).

    can u kindly show me how to do it with vba such that I do not need to open the other spreadsheet? there is a large range of data to update so ideally there is a way to replace the name globally.



    wud apprec assistance on the folg:

    i need to dynamically link a cell to another worksheet as follows:
    ='[abc.xls]Sheet1'!$B$4 where abc.xls is a variable and linked
    to a cell address (e.g. A1 i.e. cell A1 contains "abc.xls")

    such that when I change the value in cell A1 (e.g. to def.xls), the
    dynamic link changes automatically to ='[def.xls]Sheet1'!$B$4