Dir()

  • Thread starter Thread starter LouisBrim
  • Start date Start date
L

LouisBrim

Guest
Hey Guys,

Having a spot of bother with the dir command in VB 6.0

it works fine if I have a directory:

c:\vb\workstuff\

but doesn't if I have the directory

c:\vb\work stuff\

Anyone know the syntax to accept this??

Thanks
 
I'm not great on VBA, but I'm pretty sure that your problem is the space: a bit like weblinks and Field names etc.

Regards

HowieJ
 
Yep, I think it's the space as well. If you don't want 'workstuff' as one word then you can always insert an underscore i.e. work_stuff
 
Dir("c:\vb\work stuff\", vbDirectory) should work and return "work stuff". Is this the syntax you are using?
 

Users who are viewing this thread

Back
Top Bottom