Hi, I have a Hyperion Addin installed in my system, To give a background about the system. Hyperion is a financial management software. Its Add- in helps the users to retrieve data of particular accounts on the excelsheet according to parameters set.
Problem: The Add-in is like a menu on the Tollbar, just similar to the file menu we have. There is a refresh button on this toolbar, which refreshes the worsheet[According to the parameters pre-set on the sheet]. I have designed a loop which changes the parameters on the worksheet, once the loop is complete. And Sendkeys method has been used to refresh the sheet to view the data. The actual problem lies here. The refresh button takes some time to pull the data on the sheet. Can we have something to pause the loop for a while, and to resume the loop once the data has completly downloaded? I have used the Wait method, but that doesnt work! The code is as follows: <Macro Code-------starts here> Sub TotalSolutionFullsheet() Dim Entity As Range Dim CountNo As Variant Dim RngEntNo As Range Set RngEntNo = Range("rngEntityNo") For Each CountNo In RngEntNo 'This line helps to input the new parameter Range("RngTargetCell").Value = CountNo Call testrefresh ActiveWindow.SelectedSheets.PrintOut Collate _ :=True Next End Sub Sub testrefresh() Application.SendKeys "%yr", True End Sub <Macro Code-------ends here> If i input the parameters manually, i can successfully run the testrefresh macro, it helps me retrieve the data. But if i run the loop, it will not let the macro to hold down till the time data gets downloaded in the cells. Please advice Thanks Harpreet Gujral
-- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us in TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe