![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: India
Posts: 5
|
Hi,
I have a piece of code which look like this: ****************** With Application.FileSearch .LookIn = strFolder .SearchSubFolders = False ............. ****************** if the strfolder is a network folder on which I dont have any access the .LookIn always defaults to "My Documents" . Does anybody have a workaround? Thanks, Anoop |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
function to default to the Dir you want. eg If Dir(StrFolder) <> "" Then StrFolder = "C:" With Application.FileSearch .LookIn = StrFolder .SearchSubFolders = False End With |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Location: India
Posts: 5
|
I'd wanted an error to be raised when the folder specified in .LookIn could not be accessed. Is there any way to achieve this?
Thanks, Anoop |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|