+ Reply to Thread
Results 1 to 3 of 3

Updating Custom Function

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    863

    Updating Custom Function

    I have a basic custom function to include the full file path and name in cell like such.

    Please Login or Register  to view this content.
    But when I either move or rename the file, I want the cell value to update to the current folder/file name structure automatically. And I only want to update this one specific worksheet or named ranged, and not the entire workbook as it slows down the opening of the file. I've tried using the below in the workbook module but it does not update the cells.
    Please Login or Register  to view this content.
    I did try changing the above to use CalculateFull and Excel throws a run time error. So what is the trick to updating a selected worksheet or named range in VBA without updating the entire sheet?

  2. #2
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    863

    Re: Updating Custom Function

    Well.

    I found a way to do this using built in excel formula's like such. but there still could be an easier way, but I did need t e double \\ in the file path for OLE link in Word.

    Please Login or Register  to view this content.
    That give me something like C:\\Data\\Folder\\myfile.xlsx.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: Updating Custom Function

    Another way could be to use names
    FullPath =SUBSTITUTE(WkPath,"\","\\") & WkName
    WkName =MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1)
    WkPath =LEFT(CELL("filename"),FIND("[",CELL("filename"),1)-1)

    and somewhere ( e.g. C3) put =FullPath
    - Battle without fear gives no glory - Just try

+ 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. [SOLVED] custom functions: no updating of results when the cell with argument changes
    By juergen(barcelona) in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-27-2013, 06:20 PM
  2. Help with automatic chart updating/auto updating today function
    By Tux2424 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-26-2012, 04:45 PM
  3. [SOLVED] Custom counting functions not updating?
    By kortex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2012, 12:02 AM
  4. Custom Function not updating
    By lister_d_000169 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-30-2006, 05:03 AM

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