+ Reply to Thread
Results 1 to 3 of 3

macro to refresh a sheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Birmingham, UK
    MS-Off Ver
    2007
    Posts
    185

    macro to refresh a sheet

    Hello Guys,

    I have been trying to write a macro that will refresh the sheet in my workbook which has values called in by formulas from other files. Between Sub and End Sub I have put
    Sheets("sheetname").RefreshSheet
    Exactly as it is with Pivot tables (but we add ').PivotTable("name").Refr'

    It comes back as Error 438 - Object doesn't support this property or method.

    If anyone knows where the mistake is please help or maybe I should use some other command for refreshing those formulas.

    Also does anyone know a book or maybe a website with macro language - commands.

    Thanks for giving it a try.

    Simon
    Last edited by Ramzes; 05-19-2011 at 03:19 AM. Reason: problem solved
    ...and this is when I walk in, dressed fully in white...

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,321

    Re: macro to refresh a sheet

    Hi Ramzes,
    To understand your question I turned on "Record Macro" and clicked on a pivot table. I got two lines of code:
        ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
        ActiveWorkbook.RefreshAll
    I don't see any RefreshSheet word in the Object Model.

    My normal method to understand these kinds of questions is to record a macro and then see how I might modify it to work in general.

    hope this helps.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Birmingham, UK
    MS-Off Ver
    2007
    Posts
    185

    Re: macro to refresh a sheet

    Thanks.

    It did work. I needed the part with workbook only.
    Thanks for your help.

    Simon

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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