LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default PATH Update; VBA problems

I have a cell "F10" on sheet 1 that contains the PATH for the file. I
have the following code which is working fine:

Private Sub Workbook_Open()
Application.Caption = ThisWorkbook.Path
Sheet1.Range("F10").Value = ThisWorkbook.Path
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Caption = ""
End Sub

Upon opening the book, the Path is listed in the caption bar and
updates F10 with the location. Upon closing it removes it from the
caption bar.

What I want to do is have that cell updated anytime the file is saved.
I tried the following code. It did not give me an error but it also
did not give me my desired result.

Private Sub Workbook_AfterSave()
Sheet1.Range("F10").Value = ThisWorkbook.Path
End Sub

What am I missing?

Thank you for your help.

RU
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup - Update Path Clyde Dickson[_2_] Excel Worksheet Functions 3 August 26th 09 01:44 PM
Excel problems after winXP sp3 update jamoldover Excel Discussion (Misc queries) 4 May 28th 08 04:25 PM
auto file path update when excel sheet moved to another directory. GNSBoy Excel Discussion (Misc queries) 1 August 31st 05 07:46 PM
Recurring Problems with Links with Full Path Names JMcBeth Excel Discussion (Misc queries) 1 February 4th 05 10:11 PM
More UDF problems; some won't update, some won't stop running! Keith R[_3_] Excel Programming 0 August 1st 03 02:01 PM


All times are GMT +1. The time now is 01:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"