Re: GetOpenFilename
From: wtpcomplab (wtpcomplab_at_discussions.microsoft.com)
Date: 01/04/05
- Next message: Tom Ogilvy: "Re: excel page numbers"
- Previous message: quartz: "Error running simple command"
- In reply to: Ron de Bruin: "Re: GetOpenFilename"
- Next in thread: James Cox: "Re: GetOpenFilename"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 4 Jan 2005 10:36:34 -0800
Thank You
Dan
"Ron de Bruin" wrote:
> Hi
>
> Try this
>
> Sub test()
> Dim FName As Variant
> Dim wb As Workbook
> Dim MyPath As String
> Dim SaveDriveDir As String
>
> SaveDriveDir = CurDir
>
> MyPath = "C:/Chrysant"
> ChDrive MyPath
> ChDir MyPath
>
> FName = Application.GetOpenFilename(filefilter:="Excel Files (*.xls),
> *.xls")
> If FName <> False Then
> Set wb = Workbooks.Open(FName)
> MsgBox "your code"
> wb.Close
> End If
>
> ChDrive SaveDriveDir
> ChDir SaveDriveDir
>
> End Sub
>
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
>
> "wtpcomplab" <wtpcomplab@discussions.microsoft.com> wrote in message
> news:BE57E5DC-7274-4EA3-8590-38A45A145C2A@microsoft.com...
> > Is there a way to set the "GetOpenFilename" command to start in a specific
> > directory?
> >
> > NameOfFile = Application _
> > .GetOpenFilename("Excel Files (*.xls), *.xls")
>
>
>
- Next message: Tom Ogilvy: "Re: excel page numbers"
- Previous message: quartz: "Error running simple command"
- In reply to: Ron de Bruin: "Re: GetOpenFilename"
- Next in thread: James Cox: "Re: GetOpenFilename"
- Messages sorted by: [ date ] [ thread ]