Posts by AndrewJ

    Re: Macro To Match Data Line By Line


    You mean if cell A1 is the same on both sheets AP and Move it means those lines are the same, and you want one of those lines (either, since theyre the same?) copied into match? If the lines dont match, just leave a blank line?


    if I got that right:


    Re: Column Selection


    Something like this will get you started, I do a lot of list and data parsing also, your best friend is "worksheetfunction.counta" :)



    Alternately, you could use a resize




    note I didnt test this, there might be a syntactical error(s) but the code works I've done these same things many times. You might have to mess around with the x-1 part of the resize, I think itll do what youll looking for but its easy to change. Just throw the selection.resize statement in its own sub, put real solid numbers in instead of variables, and play with how it changes the selected area.


    edit: just saw that you might have empty rows in columns after the first one. Thats easy to fix:


    Re: Dragging Formulas With Keyboard


    Are you talking about fill? You can select the cell, drag down 10 or 100 or whatever cells, and then click ctrl-d and it will copy your formula down into all the cells you selected.

    Re: Send Email With Macro


    "Sorry, my bad...I think the reason that I can't use CDO is because there are going to be people on many different servers using this. I know send keys isn't the most reliable but I'm stuck at this point. I was just wondering if there is anyway to tell excel that the email was sent and if not keep trying until it is sent."


    Well, if theyre all running windows 2000 or later you shouldn't have a problem with it. I do something similar at my work - I have an application where when the user is finished and closes the excel file it sends a log file to me via CDO... this has worked on every computer at my work for 20+ people... and these people all have restricted user access on their PCs as well, and no problems at all. (I have the outlook method as the backup, which the log would make note of when used, but it hasnt had to be used once.)

    Re: Sending Email With Vba Loop Function


    btw, unless youre setting 'Subj' to a value... you're not setting anything for the subject.


    Try: "mysubjecthere" with quotes, dont do it as a variable

    Re: Changing Multiple Hyperlinks With A Macro


    Try something like this, as long as the username is the same for all the strings it should work


    Re: Sending Email With Vba Loop Function


    You probably need to add a reference to the Microsoft Forms 2.0 Object Library


    That single piece of code shouldnt give any errors... what error was it?

    Re: Sending Email With Vba Loop Function


    You can use CDO and avoid outlook entirely


    Re: Moving A Hyperlink


    dude.. read my post:


    "Without seeing it, I would say you're copying the row using ".Value". You should instead try ".FormulaR1C1"."


    Try that and see if it works.

    Re: Extracting Data From Table And Emailing It As Attachment


    Does this work? I didnt make it do an attachment or any fancy formatting in the string, but hopefully itll get you started.


    Re: Moving A Hyperlink


    Can you post you code?


    Without seeing it, I would say you're copying the row using ".Value". You should instead try ".FormulaR1C1".


    If that doesnt work, then you may have to make the cell a hyperlink again after you copy the data over. Post your code and I'll look at it.


    I believe the code for adding a hyperlink to a cell in VBA is


    Code
    ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:="url", TextToDisplay:="txt"

    Re: Comparing Two Columns For Duplicates


    No, C++ syntax will break your code ;)


    What I mean is, the logic behind it is the same - the commands are different but the thought process you should go through is the same.


    I would do something like




    I was assuming you have a basis for C++ and you'd know what boolean means and stuff like that, ask if it still looks like greek to you :)

    Re: Comparing Two Columns For Duplicates


    Why not just do it in C++? The logic should be the same....


    You'd have to do something like test each character for an entry against each character of the other list and if 4 out of 5 match - or if 8 out of 10, etc - then count it as a match. I would use left() and right() to cut a string down by 1 character each time and compare it every time to the entry.