+ Reply to Thread
Results 1 to 3 of 3

Custom Worksheet Function doesn't update

  1. #1
    Registered User
    Join Date
    07-26-2009
    Location
    Wilmington, DE
    MS-Off Ver
    Excel 2000
    Posts
    2

    Custom Worksheet Function doesn't update

    Hi all-

    Relatively new to Excel. Searched the forums but couldn't find this issue:

    I wrote a custom function in VBA that loops through all the worksheets in the workbook and puts each one's name into a array. (Similar to the "Table of Contents" problem on another thread).

    I then paste this custom function into a bunch of cells, Ctrl-Shift-Enter, and it nicely displays each worksheet's name in the consecutive cells.

    My problem - and this is an issue of just generally understanding how these VBA functions work - is that when I change one of the worksheet names manually, the cell with that sheet's name doesn't update. However, if I re-paste the function into a bunch of cells and Ctrl-Shift-Enter again, it will show the new worksheet name (while the old worksheet name is still in the other set of cells).

    My question: why doesn't this auto-recalculate like most Excel functions do (automatic calc is on in the Options, BTW), and how can I make it do it? Code below, using Excel 2000 (my company hasn't upgraded):

    Please Login or Register  to view this content.
    Thanks for any wisdom!!
    Last edited by jeffersii; 07-27-2009 at 08:44 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Custom Worksheet Function doesn't update

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here


    Also see: http://www.decisionmodels.com/calcsecretsj.htm

    On an aside you may want to revise the approach from a Function to a Workbook orientated event...
    Last edited by DonkeyOte; 07-27-2009 at 11:20 AM.

  3. #3
    Registered User
    Join Date
    07-26-2009
    Location
    Wilmington, DE
    MS-Off Ver
    Excel 2000
    Posts
    2

    Re: Custom Worksheet Function doesn't update

    Oops, thanks Donkey. I corrected.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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