Posts by josh1981

    Re: CDO hotmail SMTP error


    Hi Bud.
    Tried port 587 with the following error:
    The server rejected the sender address. The server response was: 530.5.7.0. Must issue a STARTTLS command first.

    Hi. I am trialing the CDO code to send emails with a hotmail account as the sender, but I am getting an error message 'The transport failed to connect to the server'. Can someone have a look at the code and tell me if they can find what the problem is. I have changed the port from 25 to 465 but still no success. Thanks.


    Hi. Bellow is a macro for generating reports based on multiple criteria. It is basically duplicated for four different people. A specific file from a specific folder will open depending on the name in cell B5. Also, for each name there are simularities in the criteria for opening specific files. And the rest of the code is basically the same e.i. copy, paste values, protect sheet. Is there a way of minimizing the code? Thanks.


    Re: Macro to Paste into a TextBox


    Awesome, Thanks.
    With (Survey!E51,"#"), is there a way of making that number have a comma separater (e.g. 79,307).
    The reason I went for the text box is for presentation. Is there a better way than using the text box?

    Re: Macro - cell value equals cell value above (with number format) plus 1


    Quote from jindon;615865

    You mean like this?



    That is it Jindon! Thanks a lot, and thanks everyone for their replies.

    Re: Macro - cell value equals cell value above (with number format) plus 1


    Quote from mikerickson;615838

    I don't know what variable names that you use to find the first blank cell. Substitute your variable name for blankcell in my formulation.



    Hi Mike. I am new to this but I think the code that I am using to find the first blank cell in column A (see below) does not use variables. Would you suggest using something else?

    Re: Macro - cell value equals cell value above (with number format) plus 1


    Quote from mikerickson;615696

    The OP says that the first blank cell has been found. From that point


    Code
    With blankCell.EntireColumn
        .Value = .Cells(Application.Match(9.9E+307, Range(.Cells(1,1), blankCell)), 1).Value +1
    End With



    Hi Mike.
    I got a Run-time error '424':
    Object required


    'With blankCell.EntireColumn' was highlighted

    Re: Macro - cell value equals cell value above (with number format) plus 1


    Quote from PCI;615053

    "The code found a blank cell (that i had put an apostrophe in) " --> it means it's not an empty cell
    "code found the first blank cell" --> what is a blank cell, a cell with space, apostrophe or empty??
    Perhaps try


    The easiest, sent an example


    Hi, thanks for your help again. I have attached the spreadsheet that I am using.
    1. Find the first blank cell in column A. In this case it would be A191. I have the code already for this but I need to put apostophes in some of the blank cells throughout the column so the code works. I am basically finding the row down from the row that has been filled out.
    2. Find the cell above that has a number format. In this case I am looking for A186.
    3. Take the value of that cell and add 1. So it would be 174 + 1 = 175
    4. Put that value in the blank cell. So I would want 175 to go in A191.
    [ATTACH=CONFIG]46765[/ATTACH]

    Re: Macro - cell value equals cell value above (with number format) plus 1


    Quote from PCI;615005

    Perhaps


    Hi. Thanks for your help. The following occured with this code:


    1. The code found a blank cell (that i had put an apostrophe in) above the first number cell in the column, and entered a value in that blank cell of the first number cell plus 1. So basically opposite of what I am trying to do (going up the column instead of down).


    2. I filled in that blank cell with a number and text. The code found the first blank cell at the bottom of the column, however put the value 1 in that blank cell. This is what I am trying to do except I want the value to be 1 plus the value of the cell above it if the value of that cell is a number.

    Re: How can I use a range for target address?




    Hi Andy
    why can i not use a third range?:
    Target, Range("C3:C8", "E3:E8") - this works
    Target, Range("C3:C8", "E3:E8", "F15:F16") - this does not work