Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having a problem using getopenfilename function. It runs OK the first
time, but when I go to re-run this routine it does not return an "array" and the routing does not run a second time. Can't figgure out the behavior. Has anyone seen this? ++++++++++++++++++++++++++++++++++++++++++++++++ fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls", , , , True) If IsArray(fileToOpen) Then ' if no files selected, then do nothing, otherwise, run the routines below ***** AND THEN I MANIPULATE THE DATA HERE ***** fileToOpen.Close End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 25 jun, 21:26, JimBob wrote:
I am having a problem using getopenfilename function. It runs OK the first time, but when I go to re-run this routine it does not return an "array" and the routing does not run a second time. Can't figgure out the behavior. Has anyone seen this? ++++++++++++++++++++++++++++++++++++++++++++++++ fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls", , , , True) If IsArray(fileToOpen) Then ' if no files selected, then do nothing, otherwise, run the routines below ***** AND THEN I MANIPULATE THE DATA HERE ***** fileToOpen.Close End If Hi JimBob, Try this: Sub ProcessFile() Dim fileToOpen As String fileToOpen = Application.GetOpenFilename("Excel files (*.xls), *.xls") If fileToOpen < "False" Then ' DO THIS AND THAT End If End Sub HTH, Wouter |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi RadarEye
Use False instead if "False" to avoid international problems See http://www.oaltd.co.uk/ExcelProgRef/default.htm Read the International Issues chapter of the book -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RadarEye" wrote in message ups.com... On 25 jun, 21:26, JimBob wrote: I am having a problem using getopenfilename function. It runs OK the first time, but when I go to re-run this routine it does not return an "array" and the routing does not run a second time. Can't figgure out the behavior. Has anyone seen this? ++++++++++++++++++++++++++++++++++++++++++++++++ fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls", , , , True) If IsArray(fileToOpen) Then ' if no files selected, then do nothing, otherwise, run the routines below ***** AND THEN I MANIPULATE THE DATA HERE ***** fileToOpen.Close End If Hi JimBob, Try this: Sub ProcessFile() Dim fileToOpen As String fileToOpen = Application.GetOpenFilename("Excel files (*.xls), *.xls") If fileToOpen < "False" Then ' DO THIS AND THAT End If End Sub HTH, Wouter |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
FName = Application.GetOpenFilename(filefilter:="Excel Files (*.xls), *.xls") If FName < False Then Workbooks.Open (FName) End If If you use multiselect then use the array like this FName = Application.GetOpenFilename(filefilter:="Excel Files, *.xl*", _ MultiSelect:=True) If IsArray(FileNameXls) = False Then 'do nothing Else 'Your code End If -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "JimBob" wrote in message ... I am having a problem using getopenfilename function. It runs OK the first time, but when I go to re-run this routine it does not return an "array" and the routing does not run a second time. Can't figgure out the behavior. Has anyone seen this? ++++++++++++++++++++++++++++++++++++++++++++++++ fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls", , , , True) If IsArray(fileToOpen) Then ' if no files selected, then do nothing, otherwise, run the routines below ***** AND THEN I MANIPULATE THE DATA HERE ***** fileToOpen.Close End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Setting up and Configuration of Excel | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
Open a file do a macro ( made) and open next succesive file | Excel Programming | |||
Open File or Switch Between Windows if File is Open | Excel Programming | |||
Open File or Switch Between Windows if File is Open | Excel Programming |