Posts by P1g5purt

    Re: Email Notification on file save


    You could use some event driven code?



    Replace "Bold Text" & "Standard Text" with whatever you want to see and substitute the e-amil address of your supplier..

    HTH

    Re: Email Notification on file save


    Hi,

    I'm trying to adapt some code from Chip Pearson on Copying modules programmatically ( I maintain a suite of Financial Models and want to update common modules this way ). Currently the code only works when the source and target files are both open.



    The problem arises when I try to set the FromVBProject to any string containing the location

    Thanks,
    Ian

    Re: Index Match with duplicate results


    Can you separate the Container & OTR data?
    Your formulas are currently finding minimums but they find the first instance regardless of whether it's a container rate or an OTR rate.

    Re: How to simplify repetitive task: Insert cell value + Run another macro




    Where rngValues is the range name for Sheet6!A5:A10

    This will loop through the range running the macro for each of the values.

    HTH

    Re: Index Match with duplicate results


    If you're driving this using formulas then you can reset the ranges in the adjacent cell using offset
    It's a beast of a formula but

    Quote

    =INDEX(OFFSET($C$4:$O$4,,MATCH(D27,D8:P8,0),,),,MATCH(D27,OFFSET(D8:P8,,MATCH(D27,D8:P8,0),,),0))



    gives you the result you want

    Re: renaming an attachment with vba


    Code for renaming is ( assuming there's only one file attached and they're from the current directory)

    Code
    Set outmail.attachments(1) = atmt
    strFileName = atmt.Filename                                 ' Get Name Of File Attached 
    atmt.SaveAsFile strNewFileName                           ' Save as NewFileName
    outmail.Attachments.Add strNewFileName               ' Attach the file with a new name
    outmail.Attachments.Delete FileName                     ' Delete the file with the old name



    strNewFileName will need to be derived from your userform inputs.

    Re: renaming an attachment with vba


    Hi sukyb1

    Could you save the selected file with the new name before attaching it?
    Other than that I believe you'd have to save the attached file under the new name, delete the old attachment and attach the new file which isn't very elegant.

    Re: Converting negative decimal degrees to proper degrees, minutes, seconds


    Hi Vertigo,


    Can you just use the ABS of the value to convert the decimal then restate the negative?

    You get Minus 4 Degs 6 Minutes 31.875 Seconds that way

    Is a negative coordinate like this just an anti-clockwise movement?
    If so then maybe it's more 360 Degrees less 4 Degrees 6 Minutes 31.875 Seconds?

    Re: Vba, Separating Ranges With A Border


    There might be more elegant ways but this should do it?


    Hi,


    Is there anyway of editing a draft outlook document via Excel?
    I have a data file that is populated with data and sent to 56 recipients.
    I want to use a standard letter but head it with the persons name.
    The letter is too long to create using concatenated text strings and line feeds. I'd also like to keep the formatting, bullet points etc )


    Thanks,
    P1g5purt

    Re: If Link Exists Macro


    There might be more elegant ways but this should do it?



    HTH,
    P1g5purt

    Re: External Variables For Access Query


    You can name your ranges using Insert Name Define and selecting the appropriate range.
    Just a thought - Have you considered loading all the postcodes into an access table and creating a query to give you what you want?

    Re: External Variables For Access Query



    Try this. I've not been able totest it since I've not access to ACCESS presently.


    HTH,Ian

    Re: Median Blanks Array


    Think I may have missed your point.
    You want the array formula to treat the empty cells properly i.e ignore them?
    As a workaround you could put spaces in or type "Blank"