Posts by dsmith616

    Re: Displaying File 'Comments' in (Properties > Details) with Excel VBA


    I hope this isn't too old of a thread. I'm trying to use the code in the forum but none of it is working and I'm not quite understanding the link posted by snb.


    I'm attempting to get the Extended Properties as well but nothing I try works even though the code here was verified as working.


    Re: Copy row to new sheet based on cell value


    Sorry for the delayed response I was traveling out of town. I've included a sample that hopefully makes sense.


    On tab "CIT291", Column A, is a status column of the agents work. What I'd like to do is when the agent selects "Done" from either a drop down or manually types it (not sure if the coding will vary depending on method - either way is fine; easier route is acceptable) it'll copy that row over to the tab "CIT291_History". All other line items may stay on the original tab.

    Re: Extract multiple numeric value sets


    HOLY COW! Not only was that possibly the quickest reply I've seen it does work 100%!!!



    Quote from skywriter;773008

    You can try this. :cool:


    I found an extremely useful VBA code for extracting numeric values from a cell IF and ONLY IF there is only one set of numbers looking to be extracted. However, in my case there are times where I need to extract multiple numeric values, but I'm not sure how to tweak the current code. Any thoughts?


    Below is an example of what my worst case scenario would look like. At the end of the day all I need are the 9 digit numeric value after the "RID". However, one problem is "RID" is not always present in these comments in addition if possible I'd like to exclude dates. Not sure if this is plausible or not, but thought I'd ask anyways.


    [TABLE="width: 813"]

    [tr]


    [TD="class: xl64, align: left"]RID: 576233191; RID: 576372763;RID: 576372769;RID: 576372770;RID: 576372774;RID: 576372776;RID: 576372779;RID: 576372782; Please have this process shut down as it is a duplicate. The sale date has been changed from 6/23/16 to 8/4/16. This change occurred because an IRS lien was discovered and proper notices needed to be sent in order to be in compliance with the judgment order. Please have all rails/processes that were auto launched off the 6/23/16 sale date removed/closed. The NTRID are mentioned above. Thank you[/TD]

    [/tr]


    [/TABLE]



    Re: Call Function only working when Step Thru


    Quote from rory;772609

    Typically, this means that your connections are set to refresh in the background. What that means is that your code continues running before the tables are refreshed, and therefore there isn't any data for it to process. You need to turn off the background querying.


    Thanks for the tip rory. Originally I tried using 'DoEvents' which didn't work then I tried adding a delay and failed as well. However, based on your response I did a little more research and found a new option called "Application.CalculateUntilAsyncQueriesDone" and so far the testing I've done appears to function as I needed it to.


    Much appreciated for everyone's help!

    Re: Call Function only working when Step Thru


    Quote from rory;772609

    Typically, this means that your connections are set to refresh in the background. What that means is that your code continues running before the tables are refreshed, and therefore there isn't any data for it to process. You need to turn off the background querying.


    Thanks for the tip rory. Originally I tried using 'DoEvents' which didn't work then I tried adding a delay and failed as well. However, based on your response I did a little more research and found a new option called "Application.CalculateUntilAsyncQueriesDone" and so far the testing I've done appears to function as I needed it to.


    Much appreciated for everyone's help!

    Re: Call Function only working when Step Thru


    If I'm understanding what you're saying correctly, then you're correct. Let me try to re-iterate to ensure we're on the same page.


    Running my Function (or Sub - since I've tried both ways) to add hyperlinks via a Macro button or manually executing using F5 WILL NOT add any hyperlinks to my worksheet.


    However, if I add a "red dot" (sorry not sure what this is actually called) next to my CALL and proceed to step through each line it will then most definitely add the hyperlinks as it should.


    I've tried adding delays and obviously turning off automatic calculations because I thought it was maybe moving too fast through the code, but neither of those have worked.

    I can run each piece of code independently of each other and it'll work. I can add a break point and step through each line of code and it'll work fine. HOWEVER, when I attempt to run them together I do not get the same results and can't figure out why. Anyone have any suggestions?


    First piece is to update the data in multiple sheets


    Second piece is to add hyperlinks to our internal tracking system. When I execute together it selects the tab but doesn't add any hyperlinks.


    Re: VLookUp Help


    Because I will not be the individual working on said report/issues it needs to be a "living" document and able to update itself without my intervention each day.


    After playing around with some code snippets I was able to piece some things together to make it work. However, it does run SLOW! That would be my only qualm at this point. In case anyone is interested; here is my solution below.


    I can't get this VLookUp formula to apply to my column.


    Brief background:
    Tab "DATA" has SQL data being pulled in on a refreshed connection.
    Tab "Folder" pulls a list of file names from a designated folder; all in Column A.
    In the "Folder" tab, Column B, I'd like to add the VLookUp formula, but when I recorded the macro it still will not apply to all the cells only the first cell (B2).


    I can find the lastrow, but not sure why the formula isn't apply to every cell. In the For Loop is my feeble attempts at adding the formula in each cell.


    Re: Add Hyperlinks Dynamically


    I'm going to include the code that I "attempted" along with a data sample to see if that helps.


    I receive an error on the currentRng and anchorRng. Not sure what else to try.



    I've been successful using the code below adding hyperlinks when I know where the information will be (i.e. a specific column). However, I'm looking to alter this to search by header names to the column to create the link. Reason being is many reports are created and depending on who or what columns of information is needed it may differ each time. Thanks for any feedback.


    Trying to add hyperlinks into my worksheet, but can't get passes this run-time error 438



    First and foremost, I am using Outlook 2007 and creating a rule does and has not worked for this.


    I receive automated messages that I am attempting to organize and I'm guessing how the e-mails are formatted the regular Outlook rules are not able to pick it up and move accordingly. So I was hoping there was a workaround for this using VBA on incoming e-mails to only run based on a specific e-mail address for incoming messages.


    Any thoughts?

    I'm not exactly sure if this would be an IF statement (or if that's what it's called in VBA). However, I have this really small code snippet below:


    Code
    With Sheets("DISTRIBUTION")        
    .ShowAllData
    End With


    What I'd like to do is re-write this so in the event that all the data is already shown (nothing filtered) it will not cause the code to break. As it stands this will only work if the data has been filtered.

    Re: using VBA with fluctuating table sizes


    I was thinking the same thing StephenR that I may have to utilize a button. Which I did and so far so good, I've been able to complete all the tasks I outlined in a prior post. Thanks for that last code snippet to tie the rest into working order!


    Happy Friday!


    :cheers:

    Re: using VBA with fluctuating table sizes


    I tried this code and it worked on its own, but not with the Worksheet Change Event




    Also tried this variation with no luck.


    Re: using VBA with fluctuating table sizes


    I only need to copy a specific range over, not the entire page that's why there were these lines:


    Code
    [COLOR=#333333]        Range(Selection, Selection.End(xlToRight)).Select 
    [/COLOR][COLOR=#333333]        Range(Selection, Selection.End(xlDown)).Select [/COLOR]