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


Visual basic 6.0 w/Excel 2000

Below is a section of code I use to open up a specified number o
files.


Code
-------------------
For N = 1 To NumFiles

FilterList = "Text Files(*.txt),*.txt"

With Application
MyFile(N) = .GetOpenFilename(filefilter:=FilterList)
End With

Next
-------------------


99.9% of the time the files in the File Open dialog box are listed i
the order in which I select them. When the File Open dialog box open
for the first time, and every time after that, the first file in th
list is always highlighted. Is there a way to have to have VB6 move th
highlight down a file(s) after each File Open execution

--
scantor14
-----------------------------------------------------------------------
scantor145's Profile: http://www.excelforum.com/member.php...fo&userid=1476
View this thread: http://www.excelforum.com/showthread.php?threadid=26432

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default File Open Dialog

You might be able to do something with sendkeys, but I would think that would be
close to disasterous!

Maybe you could just select all the files you want with one File|open:

Option Explicit
Sub testme2()

Dim myFileNames As Variant
Dim iCtr As Long

myFileNames = Application.GetOpenFilename _
(filefilter:="Text files, *.txt", MultiSelect:=True)

If IsArray(myFileNames) Then
'keep going
Else
Exit Sub 'user hit cancel
End If

For iCtr = LBound(myFileNames) To UBound(myFileNames)
'do your stuff
Next iCtr

'....

End Sub

===
when that file|open dialog is displayed, you can click, ctrl-click, and
shift-click to get a bunch.

scantor145 wrote:

Visual basic 6.0 w/Excel 2000

Below is a section of code I use to open up a specified number of
files.

Code:
--------------------
For N = 1 To NumFiles

FilterList = "Text Files(*.txt),*.txt"

With Application
MyFile(N) = .GetOpenFilename(filefilter:=FilterList)
End With

Next N
--------------------

99.9% of the time the files in the File Open dialog box are listed in
the order in which I select them. When the File Open dialog box opens
for the first time, and every time after that, the first file in the
list is always highlighted. Is there a way to have to have VB6 move the
highlight down a file(s) after each File Open execution?

--
scantor145
------------------------------------------------------------------------
scantor145's Profile: http://www.excelforum.com/member.php...o&userid=14766
View this thread: http://www.excelforum.com/showthread...hreadid=264329


--

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
Open File Dialog box looks like Steven Excel Discussion (Misc queries) 3 January 30th 10 07:44 PM
File open dialog box [email protected] Excel Discussion (Misc queries) 1 March 21st 07 03:01 AM
File open dialog Vaughan Excel Discussion (Misc queries) 0 May 12th 05 08:50 AM
open file dialog-select file-import worksheet Divinedar Excel Programming 1 January 16th 04 07:13 PM
File open dialog Jan Kronsell[_2_] Excel Programming 1 September 5th 03 08:56 AM


All times are GMT +1. The time now is 05:43 AM.

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"