PC Review


Reply
Thread Tools Rate Thread

"Dir" uot of order

 
 
=?Utf-8?B?S2VudEFF?=
Guest
Posts: n/a
 
      28th Oct 2007
Hi
I run Excel 2007 but are writing code in an 2003excelfile (xls). Suddenly
does not Dir function works in folliwing sub

Sub FindData()

Dim path, filename As String


path = "D:Officebyggaren\CBRE\TEMP\"

Application.ScreenUpdating = False
filename = Dir(path)

......and so on

The path D:Officebyggaren\CBRE\TEMP\ include three files.
Dir have worked but suddenly it doesn't!!! Runing step by step I can see
"Filename ="" ".
Thank's in advance to that guy who can support me
/KentAE
--
If you are old enough, you have your future behind you.
 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      28th Oct 2007
Try to add a \

path = "D:\Officebyggaren\CBRE\TEMP\"


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"KentAE" <(E-Mail Removed)> wrote in message news:80DE7254-A637-4389-816B-(E-Mail Removed)...
> Hi
> I run Excel 2007 but are writing code in an 2003excelfile (xls). Suddenly
> does not Dir function works in folliwing sub
>
> Sub FindData()
>
> Dim path, filename As String
>
>
> path = "D:Officebyggaren\CBRE\TEMP\"
>
> Application.ScreenUpdating = False
> filename = Dir(path)
>
> .....and so on
>
> The path D:Officebyggaren\CBRE\TEMP\ include three files.
> Dir have worked but suddenly it doesn't!!! Runing step by step I can see
> "Filename ="" ".
> Thank's in advance to that guy who can support me
> /KentAE
> --
> If you are old enough, you have your future behind you.

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      28th Oct 2007
Perhaps it is typo, but you are missing a '\' character after the drive
spec.

path = "D:Officebyggaren\CBRE\TEMP\"
' should be
path = "D:\Officebyggaren\CBRE\TEMP\"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"KentAE" <(E-Mail Removed)> wrote in message
news:80DE7254-A637-4389-816B-(E-Mail Removed)...
> Hi
> I run Excel 2007 but are writing code in an 2003excelfile (xls). Suddenly
> does not Dir function works in folliwing sub
>
> Sub FindData()
>
> Dim path, filename As String
>
>
> path = "D:Officebyggaren\CBRE\TEMP\"
>
> Application.ScreenUpdating = False
> filename = Dir(path)
>
> .....and so on
>
> The path D:Officebyggaren\CBRE\TEMP\ include three files.
> Dir have worked but suddenly it doesn't!!! Runing step by step I can see
> "Filename ="" ".
> Thank's in advance to that guy who can support me
> /KentAE
> --
> If you are old enough, you have your future behind you.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort order messed up in "open" and "save as" dialog boxes =?ISO-8859-1?Q?Jos=E9_Sanchez?= Windows XP General 0 23rd Nov 2006 11:35 AM
Sort order messed up in "open" and "save as" dialog boxes =?ISO-8859-1?Q?Jos=E9_Sanchez?= Windows XP Help 0 23rd Nov 2006 11:35 AM
Sort order for "Open"/"Save" Dialog Boxes rich@bittar.org Windows XP Customization 2 15th May 2006 10:14 PM
Order of files and folders in the "Save As" and "Open File" dialogues MM Windows XP Configuration 3 7th Dec 2004 03:24 PM
Order form - same info in "Invoice to" & "ship to " Ted Microsoft Access Forms 2 7th Jul 2004 07:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:14 PM.