Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello:
I am programming in Excel 2000 VBA, and using the dir function: If dir(MYPATH, vbDirectory) = "" then ...... End If I am getting "Bad File or Number" error although MYPATH variable have consistent data. I would appreciate any suggestion. My best regards. Roberto |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is MYPATH a folder or a file?
It seems Excel is trying to tell you that you are not pointing to a valid file or folder (no surprise) ... Is it a mapped folder? Not sure that should make a difference but it has me curious. I'll try to help more (if no one else posts the answer) if you give a few more details. Bill "Roberto Carabajal" wrote in message ... Hello: I am programming in Excel 2000 VBA, and using the dir function: If dir(MYPATH, vbDirectory) = "" then ..... End If I am getting "Bad File or Number" error although MYPATH variable have consistent data. I would appreciate any suggestion. My best regards. Roberto |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MYPATH contains the name of a folder C:\spl
This folder exists. There are no quotes in the data. Roberto |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Did you put a break on it and see for sure what the value of MYPATH is
and/or debug.print it to the immediate window? I have tested it and it should work if the directory exists, unless maybe it is an attribute issue (like it is a hidden folder) but then it should at least show null. Sorry I cannot help much more, if you do not get an answer soon, maybe repost the problem. "Roberto Carabajal" wrote in message ... MYPATH contains the name of a folder C:\spl This folder exists. There are no quotes in the data. Roberto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - error saving file & error loading dll | Excel Discussion (Misc queries) | |||
Error opening edited XML file - Where is the error log? | Excel Discussion (Misc queries) | |||
Open Excel file get error with file names that have spaces in the | Setting up and Configuration of Excel | |||
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. | Charts and Charting in Excel | |||
Error:Invalid File format,while opening an Excel Template file | Excel Programming |