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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 02:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com