Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default selecting a file automatically

I'm kinda of stuck and would appreciate your help. I have
a macro where the "open" dialog box is displayed.
Currently the user selects which file they want to
select. (Users are supposed to select the first one but
not everyone is following the "rules" .)

To resolve this issue, we would like the macro to select
the first file automatically. However, I'm having trouble
coming up with the code to do this. The name for the
first file is always something different.

Any suggestions would be greatly appreciated. Thanks....JT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default selecting a file automatically

Define what you mean by first file.

a file listing can be sorted by several attributes, so saying first file
isn't definitive. latest date/earliest date, alphabetically,
largest/smallest????

--
Regards,
Tom Ogilvy

"JT" wrote in message
...
I'm kinda of stuck and would appreciate your help. I have
a macro where the "open" dialog box is displayed.
Currently the user selects which file they want to
select. (Users are supposed to select the first one but
not everyone is following the "rules" .)

To resolve this issue, we would like the macro to select
the first file automatically. However, I'm having trouble
coming up with the code to do this. The name for the
first file is always something different.

Any suggestions would be greatly appreciated. Thanks....JT



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default selecting a file automatically

By first, I mean the file you would see at the top of the
list when the "Open" dialog box is displayed. Thanks


-----Original Message-----
Define what you mean by first file.

a file listing can be sorted by several attributes, so

saying first file
isn't definitive. latest date/earliest date,

alphabetically,
largest/smallest????

--
Regards,
Tom Ogilvy

"JT" wrote in

message
...
I'm kinda of stuck and would appreciate your help. I

have
a macro where the "open" dialog box is displayed.
Currently the user selects which file they want to
select. (Users are supposed to select the first one but
not everyone is following the "rules" .)

To resolve this issue, we would like the macro to select
the first file automatically. However, I'm having

trouble
coming up with the code to do this. The name for the
first file is always something different.

Any suggestions would be greatly appreciated.

Thanks....JT


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default selecting a file automatically

Again, I can change that if I display the listing using the detail option
and clicking on any of the attributes. I don't know that there is a default
first file.

try this

sName = Dir("C:\MyFiles\*.xls")
msgbox sName

and see if that gives you want you want. (but I would test it pretty
thoroughly before I decided that it will work reliably).

--
Regards,
Tom Ogilvy

"JT" wrote in message
...
By first, I mean the file you would see at the top of the
list when the "Open" dialog box is displayed. Thanks


-----Original Message-----
Define what you mean by first file.

a file listing can be sorted by several attributes, so

saying first file
isn't definitive. latest date/earliest date,

alphabetically,
largest/smallest????

--
Regards,
Tom Ogilvy

"JT" wrote in

message
...
I'm kinda of stuck and would appreciate your help. I

have
a macro where the "open" dialog box is displayed.
Currently the user selects which file they want to
select. (Users are supposed to select the first one but
not everyone is following the "rules" .)

To resolve this issue, we would like the macro to select
the first file automatically. However, I'm having

trouble
coming up with the code to do this. The name for the
first file is always something different.

Any suggestions would be greatly appreciated.

Thanks....JT


.



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
automatically selecting contiguous cells - Why? becder New Users to Excel 5 March 16th 10 05:59 PM
automatically selecting items in drop down list Tom Mucciolo Excel Discussion (Misc queries) 5 September 2nd 08 04:31 AM
Automatically selecting the next empty row Alec H Excel Discussion (Misc queries) 2 March 1st 06 09:21 AM
How to stop Excel from automatically selecting cells? geekgirl33 Excel Discussion (Misc queries) 1 July 5th 05 11:50 PM
Automatically selecting the next option in a drop down menu. Kirby[_3_] Excel Programming 0 June 8th 04 07:56 PM


All times are GMT +1. The time now is 01:55 PM.

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"