Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default FileServer with GetOpenFilename

Here my code :

Public fName As String
Sub Auto_Open()
ChDrive "\\Mchh227a\FS000458\"
ChDir "\\Mchh227a\FS000458\TS B\TS B 2 (MD MM pWLAN
SAM)\IntegrationProjects\# Templates\ServiceBlueprints\SLA Violation
Radar\Actis Scan"
fName = Application.GetOpenFilename
'MsgBox fName
End Sub


Is it possible to use a Fileserver instead of a drive letter ? If not how
can i integrate so he can open directories on FileServer ?

Thanks alot in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default FileServer with GetOpenFilename

Hi Philipp,

You can use the SetCurrentDirectoryAPI to set the current directory to
a UNC path. Here's a quick procedure that will do this:

Private Declare Function GetCurrentDirectoryA Lib "kernel32" _
(ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

Public Sub SetUNCPath(ByVal szPathToSet As String)
SetCurrentDirectoryA szPathToSet
End Sub

Despite the name, it works on regular drive\path strings as well.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Philipp Oberleitner" wrote in message
...
Here my code :

Public fName As String
Sub Auto_Open()
ChDrive "\\Mchh227a\FS000458\"
ChDir "\\Mchh227a\FS000458\TS B\TS B 2 (MD MM pWLAN
SAM)\IntegrationProjects\# Templates\ServiceBlueprints\SLA Violation
Radar\Actis Scan"
fName = Application.GetOpenFilename
'MsgBox fName
End Sub


Is it possible to use a Fileserver instead of a drive letter ? If not how
can i integrate so he can open directories on FileServer ?

Thanks alot in advance




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
how to hyperlink a column of fileserver addresses? stumped-in-excel Excel Worksheet Functions 2 November 7th 08 09:39 PM
GetOpenFilename Greg Bloom Excel Programming 0 February 9th 04 03:32 PM
GetOpenFilename Wolfgang Excel Programming 1 February 6th 04 07:37 PM
getopenfilename inquirer Excel Programming 1 December 3rd 03 11:37 AM
GetOpenFilename Hasan Cansü Excel Programming 0 September 24th 03 01:32 PM


All times are GMT +1. The time now is 11:14 AM.

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

About Us

"It's about Microsoft Excel"