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

Is there a possibility to give this command a directorsy he should start on
default
for example D:\Test then the user gets to see the files which are in there
first


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Application.GetOpenFilename

Hi Philipp,

Adapting the code from my last response in your previous thread, try:

Sub Test2()
Dim fName As Variant
ChDrive "D\"
ChDir "D:\Test"
fName = Application.GetOpenFilename
Test3 fName

End Sub

Sub Test3(Filenme)
Workbooks.Open Filenme

End Sub


---
Regards,
Norman



"Philipp Oberleitner" wrote in message
...
Is there a possibility to give this command a directorsy he should start

on
default
for example D:\Test then the user gets to see the files which are in there
first




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

Option Explicit
Sub testme()

Dim myOtherFolder As String
Dim myFileName As Variant
Dim MyCurFolder As String
Dim wkbk As Workbook

myOtherFolder = "C:\temp"
MyCurFolder = CurDir

ChDrive myOtherFolder
ChDir myOtherFolder
myFileName = Application.GetOpenFilename
ChDrive MyCurFolder
ChDir MyCurFolder

If myFileName = False Then
Exit Sub
Else
Set wkbk = Workbooks.Open(Filename:=myFileName)
End If

End Sub

Philipp Oberleitner wrote:

Is there a possibility to give this command a directorsy he should start on
default
for example D:\Test then the user gets to see the files which are in there
first


--

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
Application.GetOpenFileName ptrowe Excel Programming 2 September 11th 03 12:54 PM
GetOpenFilename Daniel[_4_] Excel Programming 3 July 27th 03 11:00 AM


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