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

Hello,
Within VB6, I have Excel(2000) open and I need to open another workbook
using Application.GetOpenFilename(). I am using ChDir and ChDrive before.
Eventhough ?App.Path in the immediate windows shows the correct path, when
executing the method, another drive and folder is showned in the dialogue
box. Is there a way to get it to open where I would like it to open?

Your help will be appreciated.

Sub prepareTSData()
Dim selectedFile As String, saveInThisDir As String
Dim theDrive As String, theFolder As String
'display dialog asking user to select a TSData file
saveInThisDir = saveInDir(currentFileInfo.fileName)
theDrive = Left(fullPath, 1)
ChDrive theDrive
theFolder = currentFileInfo.fileDir
ChDir theFolder
selectedFile = Application.GetOpenFilename( _
"Excel Files (*.xls),*.xls", , _
"Select your TSData file", , False)
............

Daniel


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
Using filename retrieved from GetOpenFilename Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 2 September 12th 08 07:47 PM
GetOpenFilename not returning a usable variable Lilivati Excel Discussion (Misc queries) 2 June 26th 06 09:02 PM


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