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

Hi atm im using a local version of GetOpenFilename but not everyone on the
network has theis network drive mapped on D:\

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


If i use a code like this i get an error.

Thanks alot in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default GetOpenFileName with network

Hi Philipp

change

....SLA Violation Radar"

to

....SLA Violation Radar\"



-----Original Message-----
Hi atm im using a local version of GetOpenFilename but

not everyone on the
network has theis network drive mapped on D:\

Public fName As String
Sub Auto_Open()
'ChDrive "C:\"
ChDir "\\MCHH227A\FS000458\TS B\TS B 2 (MD MM pWLAN
SAM)\IntegrationProjects\#

Templates\ServiceBlueprints\SLA Violation Radar"
fName = Application.GetOpenFilename
MsgBox fName
End Sub


If i use a code like this i get an error.

Thanks alot in advance


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default GetOpenFileName with network

here's a post from Rob Bovey/Tom Ogilvy:

========

Private Declare Function SetCurrentDirectoryA Lib _
"kernel32" (ByVal lpPathName As String) As Long

Sub ChDirNet(szPath As String)
Dim lReturn As Long
lReturn = SetCurrentDirectoryA(szPath)
If lReturn = 0 Then Err.Raise vbObjectError + 1, "Error setting path."
End Sub

Example of usage

Sub GetFile()
On Error GoTo ErrHandler
ChDirNet "\\LOGD0FILES\OGILVTW\Docs\Temp"
Exit sub
ErrHandler:
MsgBox "Couldn't set path"
End Sub

Use like ChDir and ChDrive combined.

Philipp Oberleitner wrote:

Hi atm im using a local version of GetOpenFilename but not everyone on the
network has theis network drive mapped on D:\

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

If i use a code like this i get an error.

Thanks alot in advance


--

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
GetOpenFilename Chodu Excel Programming 1 May 17th 04 06:17 PM
GetOpenFilename Todd Htutenstine Excel Programming 2 May 13th 04 03:14 PM
GetOpenFilename Wolfgang Excel Programming 1 February 6th 04 07:37 PM
GetOpenFilename Daniel[_4_] Excel Programming 3 July 27th 03 11:00 AM
Copying files ...Network to Network Eric[_6_] Excel Programming 2 July 18th 03 08:59 PM


All times are GMT +1. The time now is 03:34 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"