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: 43
Default Dir( ) function not working first time through

For the code below, I get an error the first time through but after that it
then runs without error:

Sub GetWFiles(Wpath As String, WhichWfile As Integer)
Dim qt As QueryTable, Wdat As String
Wdat = Dir(Wpath & "\W*.dat")
etc...

Can anyone tell me why?

Here are more details. The error is:
"Excel cannot find the text file to refresh this external data range. Check
to make sure that the text file has not been moved or renamed, then try the
refresh
again."

I posted all the code of the subroutine in a previous post 3 days ago, which
was perhaps overkill since no one responded. If you're interested, that
message was entitled: "Query Table problem when running first time only"
-Tony

 
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
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
Working out a rota....If function or time? R New Users to Excel 5 February 7th 08 06:58 AM
Sum IF function From time to number not working?? [email protected] Excel Worksheet Functions 7 December 17th 07 02:18 PM
Working with Arrays, pasing from function to function mikebres Excel Programming 2 April 27th 06 06:33 PM
Various Random Codes not working from time to time Todd Huttenstine Excel Programming 0 May 21st 04 01:50 PM


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