Posts by 2Took

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

    crossposted: https://www.mrexcel.com/board/…ed-outlook-email.1211608/


    MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question


    Trying to exclude sender when recipients hit Reply All, in Excel generated Outlook email.


    I have EmailItem.To = "[email protected]" and

    EmailItem.CC = "[email protected]"


    I think I can do EmailItem.ReplyRecipients.Add "[email protected]; [email protected]"

    But how do I do that without listing specific emails, e.g. "[email protected]; [email protected]", but instead make it so that whatever addresses are in To and CC fields, will be included, but not the sender?

    Where should that code go? activesheet.combobox1.activate

    What is a VBA to:

    select next cell in column A from current row, that contains some value in it

    So, if some values are in A rows 5, 15, 20, I'd want for next time macro is triggered (e.g. button in clicked) for next of those cells to be selected. And if active row happened to be in column different than A, for macro to still know that.

    How do you use vba with a two column spreadsheet? If i want vba to check cell A1 to see if it contains a value matching any in the first column, and then scroll to the cell listed in corresponding row of second column? In example below, if A1 contains: "x1", then scroll to cell A200; if x2, then scroll to A555

    Where:

    A1 is on Sheet1

    Two column spreadsheet is on Sheet2

    x1 A200

    x2 A555

    x3 A1000

    Simplified: need macro to evaluate Sheet1, cell A1 contents, and if part of those contents matches Sheet2, X column, then go to corresponding cell listed in Y column.

    e.g. Sheet1, cell A1 has "x1 - abc". Macro needs to find "x1" in Sheet2, X column and go to cell A20 on Sheet1, because that's what's listed in Y column in the same row with x1 listed in X column. @KjBox

    Somebody knows this:

    1. Sheet1, cell A1 has a combo box, with 100 list items

    When A1 changes value, need macro to:

    2. if Sheet1, cell A1 contains value X, then go to cell Y

    3. Need this macro to refer to a list on Sheet2, which has the values X & Y, there is just as many of those pairs as list items in combo box. e.g. if portion of Sheet1, cell A1 contains "x1-" then macro should go to cell identified in same row of the Y column, if "x2-", then go to cell identified in corresponding row of the Y column, and so on. Put it another way, need macro to evaluate Sheet1, cell A1 contents, and if part of those contents matches Sheet2, X column, then go to corresponding cell listed in Y column.

    Hope this makes sense

    I have a code that attaches active Excel workbook to an email, populates, to: cc: subject: and body. In body text have a placeholder: ZZZZZ Need for it to be replaced with number of rows in column A that have value over 10


    Getting a Compile error: Syntax error on second line of the following bit of code:


    Code
    Dim Y As Integer
    
    Y = WorksheetFunction.CountIf(Range("a2").End(xlDown).Value, >10)
    
    EmailItem.HTMLBody = Replace(EmailItem.HTMLBody, "ZZZZZ", Y)



    Help!