Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to preset to a network drive?
Hi,
I would like to open a file on a network drive. the ChDir "\\KNDCLT13475.barco.com\LOG" don't work. i would like to point to a certain folder on a network drive where i select the needed file. i use now: With Application.FileDialog(msoFileDialogOpen) .AllowMultiSelect = False .InitialView = msoFileDialogViewDetails .Show If .SelectedItems.Count = 0 Then Exit Sub VarFile = .SelectedItems(1) End With But still not pointing to the right drive / directory any help welcome Ludo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to preset to a network drive?
Maybe you don't have to change the folder...
With Application.FileDialog(msoFileDialogOpen) .InitialFileName = "\\KNDCLT13475.barco.com\LOG" .AllowMultiSelect = False (Untested. I don't have a UNC path available to check.) There are ways (API functions) that you could use to change to a network path, but I bet you don't need them in this case. Ludo wrote: Hi, I would like to open a file on a network drive. the ChDir "\\KNDCLT13475.barco.com\LOG" don't work. i would like to point to a certain folder on a network drive where i select the needed file. i use now: With Application.FileDialog(msoFileDialogOpen) .AllowMultiSelect = False .InitialView = msoFileDialogViewDetails .Show If .SelectedItems.Count = 0 Then Exit Sub VarFile = .SelectedItems(1) End With But still not pointing to the right drive / directory any help welcome Ludo -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to preset to a network drive?
On 7 okt, 17:45, Dave Peterson wrote:
Maybe you don't have to change the folder... * * With Application.FileDialog(msoFileDialogOpen) * * * * .InitialFileName = "\\KNDCLT13475.barco.com\LOG" * * * * .AllowMultiSelect = False (Untested. *I don't have a UNC path available to check.) There are ways (API functions) that you could use to change to a network path, but I bet you don't need them in this case. Ludo wrote: Hi, I would like to open a file on a network drive. the ChDir "\\KNDCLT13475.barco.com\LOG" don't work. i would like to point to a certain folder on a network drive where i select the needed file. i use now: * * With Application.FileDialog(msoFileDialogOpen) * * * * .AllowMultiSelect = False * * * * .InitialView = msoFileDialogViewDetails * * * * .Show * * If .SelectedItems.Count = 0 Then Exit Sub * * VarFile = .SelectedItems(1) * * End With But still not pointing to the right drive / directory any help welcome Ludo -- Dave Peterson- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Dave, Thanks a lot, it works; Regards, Ludo |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to preset to a network drive?
Thanks for posting back with your results.
Ludo wrote: On 7 okt, 17:45, Dave Peterson wrote: Maybe you don't have to change the folder... With Application.FileDialog(msoFileDialogOpen) .InitialFileName = "\\KNDCLT13475.barco.com\LOG" .AllowMultiSelect = False (Untested. I don't have a UNC path available to check.) There are ways (API functions) that you could use to change to a network path, but I bet you don't need them in this case. Ludo wrote: Hi, I would like to open a file on a network drive. the ChDir "\\KNDCLT13475.barco.com\LOG" don't work. i would like to point to a certain folder on a network drive where i select the needed file. i use now: With Application.FileDialog(msoFileDialogOpen) .AllowMultiSelect = False .InitialView = msoFileDialogViewDetails .Show If .SelectedItems.Count = 0 Then Exit Sub VarFile = .SelectedItems(1) End With But still not pointing to the right drive / directory any help welcome Ludo -- Dave Peterson- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Dave, Thanks a lot, it works; Regards, Ludo -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Network drive | Excel Worksheet Functions | |||
map network drive | Excel Programming | |||
Using An Add-in On A Network Drive | Excel Programming | |||
Link workbooks-C drive to network drive | Excel Worksheet Functions | |||
Userform Local Drive & Network drive question | Excel Programming |