Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network drive Greg Excel Worksheet Functions 1 January 13th 10 04:22 AM
map network drive lumpy04 Excel Programming 1 June 5th 08 03:49 PM
Using An Add-in On A Network Drive Using An Add-in On A Network Drive Excel Programming 5 June 15th 05 09:21 PM
Link workbooks-C drive to network drive Earl Excel Worksheet Functions 0 April 19th 05 05:50 PM
Userform Local Drive & Network drive question Joel Mills Excel Programming 3 December 29th 04 10:43 PM


All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"