Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() i know u can use the following to pass a filename. Code ------------------- FName = Application.GetOpenFilename _ (filefilter:="Text Files(*.txt),*.txt,All Files (*.*),*.*" ------------------- what i want to know can i have the user select multiple files at once would FName just need to be an array or would i have to do it anothe way -- TheIrishThu ----------------------------------------------------------------------- TheIrishThug's Profile: http://www.excelforum.com/member.php...fo&userid=2968 View this thread: http://www.excelforum.com/showthread.php?threadid=49571 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi irish,
To have select more tha n one file you should give MultiSelect :=True GetOpenFilename(FileFilter, FilterIndex, Title, ButtonText, MultiSelect) and it will return an array of file names selected (even when a single file is selected) Thanks Xcelion "TheIrishThug" wrote: i know u can use the following to pass a filename. Code: -------------------- FName = Application.GetOpenFilename _ (filefilter:="Text Files(*.txt),*.txt,All Files (*.*),*.*") -------------------- what i want to know can i have the user select multiple files at once? would FName just need to be an array or would i have to do it another way? -- TheIrishThug ------------------------------------------------------------------------ TheIrishThug's Profile: http://www.excelforum.com/member.php...o&userid=29682 View this thread: http://www.excelforum.com/showthread...hreadid=495717 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Add an array declaration and Multiselect parameter to enable multiple
selections that fills the array with the selected files..... Dim Fname() Fname = Application.GetOpenFilename _ (filefilter:="Text Files(*.txt),*.txt,All Files (*.*),*.*", MultiSelect:=True) -- Cheers Nigel "TheIrishThug" wrote in message ... i know u can use the following to pass a filename. Code: -------------------- FName = Application.GetOpenFilename _ (filefilter:="Text Files(*.txt),*.txt,All Files (*.*),*.*") -------------------- what i want to know can i have the user select multiple files at once? would FName just need to be an array or would i have to do it another way? -- TheIrishThug ------------------------------------------------------------------------ TheIrishThug's Profile: http://www.excelforum.com/member.php...o&userid=29682 View this thread: http://www.excelforum.com/showthread...hreadid=495717 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi IrishThug,
Try something like: '============= Public Sub Tester001() Dim FName As Variant Dim i As Long FName = Application.GetOpenFilename _ (filefilter:="Text Files(*.txt)," _ & "*.txt,All Files (*.*),*.*", _ MultiSelect:=True) For i = LBound(FName) To UBound(FName) Workbooks.Open FName(i) Next End Sub '<<============= --- Regards, Norman "TheIrishThug" wrote in message ... i know u can use the following to pass a filename. Code: -------------------- FName = Application.GetOpenFilename _ (filefilter:="Text Files(*.txt),*.txt,All Files (*.*),*.*") -------------------- what i want to know can i have the user select multiple files at once? would FName just need to be an array or would i have to do it another way? -- TheIrishThug ------------------------------------------------------------------------ TheIrishThug's Profile: http://www.excelforum.com/member.php...o&userid=29682 View this thread: http://www.excelforum.com/showthread...hreadid=495717 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() thanks guys, this is really helpfull. -- TheIrishThug ------------------------------------------------------------------------ TheIrishThug's Profile: http://www.excelforum.com/member.php...o&userid=29682 View this thread: http://www.excelforum.com/showthread...hreadid=495717 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select multiple criteria multiple worksheets | Excel Worksheet Functions | |||
open file dialog-select file-import worksheet | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming |