Dir() command 
Author Message
 Dir() command

I am using a Macro in Word. This is embedded in a
subroutine. The VB code is as follows
Dim testfile as varient, x as variable

testfile = Dir(filename(x , 2))

[testfile is empty, filename(x , 2)
is "c:\child\myfile.doc"
The file IS in the directory and I have changed the
arguement on the Filename(x, 2) but this sees the file
correctly. Is there something in the properties of the
Word document that I should change? The error says there
is no file found, (5174) but it is spelled correctly.
Thank you

Sun, 01 Jan 2006 04:43:56 GMT  
 Dir() command
Hi Bob,
2 represents "vbhidden".
Use 0 or vbnormal instead,
where it is assumed Your are using VBA, not VB.
Greetings from Bavaria, Germany
Helmut Weber

Sun, 01 Jan 2006 12:49:06 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Excel 5.0 VBA - DIR command

2. DIR command

3. Dir command

4. bug in DIR command

5. Bad return with Dir Command...

6. Capture Dos DIR command outputs for VB

7. Help, need to wait for Dir command to finish writing a file

8. Dir Command

9. DIR command and NT - help needed

10. Nested Dir Commands

11. DIR command / valid path

12. Help with DIR command


Powered by phpBB® Forum Software