Results 1 to 8 of 8

Refresh data table via vba????

This is a discussion on Refresh data table via vba???? within the Excel Questions forums, part of the Question Forums category; Hi, Can anyone help me out with a code on how to refresh a data table via vba . My ...

  1. #1
    New Member
    Join Date
    Aug 2011
    Posts
    3

    Default Refresh data table via vba????

    Hi,
    Can anyone help me out with a code on how to refresh a data table via vba. My workbook has been set to automatic recalculation(except data tables) due to speed issues. I need to have a macro that I can call whenever I want the data table refreshed. Please help me out.

  2. #2
    MrExcel MVP
    Moderator
    SydneyGeek's Avatar
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    12,198

    Default Re: Refresh data table via vba????

    Assuming that the data table starts in A1, Sheet1 you could do something like:

    Sheets("Sheet1").Range("A1").CurrentRegion.Calculate

    Denis
    Self-preservation: For when you've got yourself in a jam
    ------------------------------------------------------
    My site contains a number of Excel and Access Resources

  3. #3
    New Member
    Join Date
    Aug 2011
    Posts
    3

    Default Re: Refresh data table via vba????

    Quote Originally Posted by SydneyGeek View Post
    Assuming that the data table starts in A1, Sheet1 you could do something like:

    Sheets("Sheet1").Range("A1").CurrentRegion.Calculate

    Denis
    That was fast! Thanks Let me try it out i'll get back to you.

  4. #4
    New Member
    Join Date
    Aug 2011
    Posts
    3

    Default Re: Refresh data table via vba????

    Seems like it didnít work. The datatable still remains unrefreshed

  5. #5
    MrExcel MVP
    Moderator
    SydneyGeek's Avatar
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    12,198

    Default Re: Refresh data table via vba????

    Sorry, I was thinking recalculation rather than refreshing a table. Try...

    Code:
    Sheets("Sheet1").Range("A1").Select
    ActiveWorkbook.RefreshAll
    Denis
    Self-preservation: For when you've got yourself in a jam
    ------------------------------------------------------
    My site contains a number of Excel and Access Resources

  6. #6
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    East Sussex
    Posts
    22,843

    Default Re: Refresh data table via vba????

    If you only have one table, f9?

  7. #7
    New Member
    Join Date
    Feb 2013
    Posts
    11

    Default Re: Refresh data table via vba????

    This did not work at my end, I want to refresh a data table selectively from a workbook which has 12 datatables.
    Is that possible?


    Quote Originally Posted by SydneyGeek View Post
    Sorry, I was thinking recalculation rather than refreshing a table. Try...

    Code:
    Sheets("Sheet1").Range("A1").Select
    ActiveWorkbook.RefreshAll
    Denis

  8. #8
    New Member
    Join Date
    Feb 2013
    Posts
    11

    Default Re: Refresh data table via vba????

    Proposed Strategy, using VBA:

    Step 1 delete all tables but not the table you want to refresh
    Step 2 refresh sheet
    step 3 restore all table that you deleted

    Quote Originally Posted by shivgan3 View Post
    This did not work at my end, I want to refresh a data table selectively from a workbook which has 12 datatables.
    Is that possible?

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com