I'm trying to collect the name of a folder (into strRemove1 below) using the
DIR function, but I can't figure out what's wrong. I've checked some of my
VBA stuff and this is the way I did it there, but obviously I'm missing
something crucial. Any suggestions are appreciated.

Ed

' Target folder:
' C:\Documents and Settings\emillis\Desktop\ Test 1234
' Test network folder
strDest = "C:\Documents and Settings\emillis\Desktop\"
' First nested folder
strRemove1 = Dir$(strDest & "Test *", vbDirectory)

Found it - typo! by Ed

Ed
Mon Jul 19 12:51:35 CDT 2004

And I *know* I looked at that 10 times! *sigh*
Ed

"Ed" <Ed_Millis@NOSPAM.Hotmail.com> wrote in message
news:O1%23ZlcbbEHA.1152@TK2MSFTNGP09.phx.gbl...
> I'm trying to collect the name of a folder (into strRemove1 below) using
the
> DIR function, but I can't figure out what's wrong. I've checked some of
my
> VBA stuff and this is the way I did it there, but obviously I'm missing
> something crucial. Any suggestions are appreciated.
>
> Ed
>
> ' Target folder:
> ' C:\Documents and Settings\emillis\Desktop\ Test 1234
> ' Test network folder
> strDest = "C:\Documents and Settings\emillis\Desktop\"
> ' First nested folder
> strRemove1 = Dir$(strDest & "Test *", vbDirectory)
>
>



Re: Found it - typo! by Ralph

Ralph
Mon Jul 19 13:06:42 CDT 2004


"Ed" <Ed_Millis@NOSPAM.Hotmail.com> wrote in message
news:%23xtiMibbEHA.2840@TK2MSFTNGP11.phx.gbl...
> And I *know* I looked at that 10 times! *sigh*
> Ed
>

LOL

It is always the code that you KNOW is correct that is broken. Of course I
never have that problem myself. <g>

-ralph



Re: Help with DIR to find folder name? by Bob

Bob
Mon Jul 19 13:11:07 CDT 2004

Ed wrote:
>
> I'm trying to collect the name of a folder (into strRemove1 below) using the
> DIR function, but I can't figure out what's wrong. I've checked some of my
> VBA stuff and this is the way I did it there, but obviously I'm missing
> something crucial. Any suggestions are appreciated.
>
> Ed
>
> ' Target folder:
> ' C:\Documents and Settings\emillis\Desktop\ Test 1234
> ' Test network folder
> strDest = "C:\Documents and Settings\emillis\Desktop\"
> ' First nested folder
> strRemove1 = Dir$(strDest & "Test *", vbDirectory)


looks like you're inconsistent about whether or not there's a leading space in the name.



Bob