Posts by fredlo2010

    Re: copy date from excel userform to word from templateo for simple example of what I


    So the final document should look something like this:

    Re: Trying to create a button to create groups(outline) based on cell value

    Perhaps this will help


    Re: Query Table Refresh

    Thanks for all your help rory. I know now a lot more than I used to before and I have been introduced to a lot of information, objects and procedures.

    I guess I will have to balance it out and see. For now the users will have to wait until the query is finished; so I have turned asynchronous off.

    Thanks again :)

    Re: Query Table Refresh

    Thanks for the time and efforts rory. After a lot of google search I saw that most likely it was a DAO property.

    I might go with the with events approach. I have a question? How do I declare a withevents variable using late binding? I was looking for that yesterday but I could not find anything, maybe I am looking for the correct term.

    Thanks again.

    Re: Query Table Refresh

    My last parameter here is for the asynchronous execute

    Set oRecordSet = .Execute(, , 16)

    I really need it to do something else while informing the user stored prtocedures can take up to 15 min to run.


    Re: Query Table Refresh

    rory by any chance do you know what's the best way to check if the recordset is finished using and ADO connection?

    Is checking for an empty object ok?

    I don't think that will work.

    Thanks :)

    Re: Query Table Refresh

    Yeah, I see myself doing that. I did not want to do it because I need the headers and with ADO I will end up having to loop through each field name to get the headers.

    Re: Query Table Refresh

    Thanks a lot for the suggestion rory;

    I don't think this solution is what I am looking for. The procedure will be in the middle of a bigger procedure. The workflow is more or less like this:

    1. Start variables and clean up workbook.
    2. Find the appropriate query.
    3. Run the query (Section with a problem)
    4. Clean up Data
    5. Add formulas and checks.


    Re: Transpose from ROWS to COLUMNS (from another workbook) via VBA Command Button

    I AM glad I was able to help.

    1. I am not sure what you mean here. Can you say it in other words.
    2. Can you attach a sample of your workbooks with before and after. Use dummy data if it contains private info. I am trying to look that the big picuture here. The concept with my code is that you dont need to select anything for it to work.


    Re: Transpose from ROWS to COLUMNS (from another workbook) via VBA Command Button

    I hope this helps. This error is most likely because you are missing references. I added tons of comments in the code so you could understand.


    Re: Search through list object table column based on criteria - excel vba

    I am glad I was able to help.

    Its always a good idea to place "Option Explicit" on top of the module to make sure all variables are always declared.


    Re: Macro Issue with Dates

    Hi Mathew,

    Give this a try and read my code comments :)

    Hope this helps :)


    I am have been working with query tables lately, trying to make a workbook to work. The problem been that if the query takes to long the workbook will freeze.

    Now, I am using querytables here because I think they will be better suited than an ADO object. I want the headings and the data and I want minimal interaction with the workbook.

    So in my code below I should be able to send a query and wait for the it to get a response back while doing something else; that way the workbook will not freeze...its just waiting for the data; plus I will be able to show the user that a task is been performed in the background.

    For some reason the query never finishes getting the information and the code just loops forever. Note that it will not loop for ever if I press and hold F8.

    Any ideas?

    BTW I am using a huge database from the PowerPivot set to recreate the retrieval delay. This one takes seconds in my real life scenario the sql statement can take up to 30 min.
    It can be downloaded from here:

    This is the code I am using:

    Thanks for the help :)