+ Reply to Thread
Results 1 to 21 of 21

Retrive and wait macro

  1. #1
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Retrive and wait macro

    Hi Friends.


    Can you help me out in creating Macro, i am working in Bloom blerg, i need a macro to retrieve data from the other macro which we already have a addin in the excel, i want a macro to retrive data for 1000 rows (changable) wait for 10 or 15 second (changable), then go to other 1000 rows and do the same..

    HI guyz is it possible can this be done?

    Attaching file for reference.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    Application.Wait is used in a macro instruct the macro to pause for a certain amount of time.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Quote Originally Posted by JBeaucaire View Post
    Application.Wait is used in a macro instruct the macro to pause for a certain amount of time.
    Thanks JBeaucaire for the info, so how should i set up the macro with this can u help me out!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    A minimalist example, this macro will look UP column A to see how many rows of data there are, then it will add that formula into column B for you into 1000 cells at a time, forcing them to recalculate, then pause 15 seconds, then do the next 1000 rows, etc, until all the rows have been processed. This is to give you a starting point you can adjust for your needs.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Hi JBeaucaire, is there a way to add a input box(lcol = InputBox) code for the ticker number "=BPD(security ticker, RC1, 5122)" (i.e the 5122 code is changable) and input box(lcol = InputBox) for the wait time how much time we need to wait.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    Maybe:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Hi JBeaucaire, i forgot to mention that the Security ticker is in open and closed inverted comma's i.e "Security ticker" when i am making changes in this row
    Please Login or Register  to view this content.
    it changes to red and gives compile error..

  8. #8
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Hi JBeaucaire, can u help me on the compiling error!

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    Maybe:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Hi JBeaucaire, i am getting "Mismatch error runtime error 13" and also i want data from 2 column that is B2 , so it should check what is the data in cell A2 and should display data in cell B2 and so on...

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    So this is different from your originally posted example? BPD is a function not in the workbook, so I can't speak to how/whether it works. My macro above as based on helping you enter the "formula" I saw in your original workbook the same way I saw it entered. You have a better workbook example?

  12. #12
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Hi JBeaucaire let me check in my office and i will get back to u!, coz i cant check it now at home! but what abt the other column. but from my knowledge i am attaching file this might be more clear
    Attached Files Attached Files
    Last edited by shreeku; 08-26-2013 at 06:35 PM.

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    Maybe change the column reference in that line of code:

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Hi JBeaucaire i have attached the file this might be more clearer to u! but thanks Bro for ur prompt and Quick Reply really Appreciate on this!

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    These are extremely simple edits, you're going to have to be able to make tweaks like this yourself if you're going to employ VBA.

    The same exact macro from post #6 with only the edits described in #9 & #13:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Hi JBeaucaire, The macro works fine till the 1000 row after that it shows "Runtime error 13” type mismatch" the below Code gets highlighted..

    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Bro can u help me out!

  18. #18
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    When you DEBUG at that moment and hover your mouse over that line of code, what is the value of WaitTime?

  19. #19
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    Waittime=15

  20. #20
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrive and wait macro

    Spotted a typo:
    Please Login or Register  to view this content.

  21. #21
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Retrive and wait macro

    will try tomorrow and let you know Bro! thanks what if there are many rows need to be retrieve what changes i have to do...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to use Cell value as variable in VB Macro
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2013, 04:17 PM
  2. Macro to retrive data for a quote that is in archive
    By marianov in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-24-2012, 08:41 AM
  3. Macro wait for input.
    By SBA lender in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-23-2011, 03:24 PM
  4. Macro to Wait for Query to Run
    By SP Brian in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-16-2010, 06:40 PM
  5. Macro Wait command
    By Donkin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2005, 06:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1