Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default ThisWorkbook.Path not updating

Have you tried compiling the macro after it goes screwy? The code below
might be useful if the path name just needs some time to update, but it
would check if the file exists, and if it doesn't it would wait a
second, and look again.
for i = 1 to 10
MyFile = Dir(pathA)
If MyFile < "" Then
Exit for
else
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
end if
next

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
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
Excel updating from XML file - file path specific? Sean Excel Discussion (Misc queries) 4 August 5th 05 12:56 PM
Link path not updating when renamed Ausrobbo Excel Discussion (Misc queries) 0 January 17th 05 09:21 AM
ThisWorkbook.Path & "\" & .... not WAVFile, but AVI file... ste mac Excel Programming 0 May 31st 04 10:22 AM
ThisWorkbook.Path Birdy Excel Programming 1 February 10th 04 02:50 AM
Custom Footer using ThisWorkbook.Path? debartsa Excel Programming 2 November 4th 03 01:47 PM


All times are GMT +1. The time now is 12:58 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"