Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel to call the win api openfile dialog with the
OFN_ALLOWMULTISELECT flag set (I am selecting multiple files). Everything works fine until I select too many files, then my function returns nothing:-( I have tried increasing the size of the string buffer: udtStruct.lpstrFile = String(400#, 32) which runs, but doesn't increase the number of files I can select. Nothing above about 254 seems to make a difference. Is this a limitation I am going to have to live with? Thanks in advance, Mike Weaver |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Any reason not to use the MultiSelect parameter of the
Application.GetOpenFilename method? Anyway, with this: OpenFile.lpstrFile = String(25000, 0) I got 156 files (all I selected) into an array: Dim FileArray as Variant FileArray = Split(OpenFile.lpstrFile, Chr(0)) -- Jim "Mike Weaver" wrote in message ... |I am using Excel to call the win api openfile dialog with the | OFN_ALLOWMULTISELECT flag set (I am selecting multiple files). | | Everything works fine until I select too many files, then my function | returns nothing:-( | | I have tried increasing the size of the string buffer: | udtStruct.lpstrFile = String(400#, 32) | which runs, but doesn't increase the number of files I can select. Nothing | above about 254 seems to make a difference. | | Is this a limitation I am going to have to live with? | | Thanks in advance, | Mike Weaver | | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
<wiping egg from face.mpeg
Thanks, that does what I need. [pointing object browser to application object] "Jim Rech" wrote in message ... Any reason not to use the MultiSelect parameter of the Application.GetOpenFilename method? Anyway, with this: OpenFile.lpstrFile = String(25000, 0) I got 156 files (all I selected) into an array: Dim FileArray as Variant FileArray = Split(OpenFile.lpstrFile, Chr(0)) -- Jim "Mike Weaver" wrote in message ... |I am using Excel to call the win api openfile dialog with the | OFN_ALLOWMULTISELECT flag set (I am selecting multiple files). | | Everything works fine until I select too many files, then my function | returns nothing:-( | | I have tried increasing the size of the string buffer: | udtStruct.lpstrFile = String(400#, 32) | which runs, but doesn't increase the number of files I can select. Nothing | above about 254 seems to make a difference. | | Is this a limitation I am going to have to live with? | | Thanks in advance, | Mike Weaver | | |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello Mike, Here are the limits... When selecting multiple files, the total character limit for the file names depends on the operating system and the version of the function. Windows 95/98/Me: (only ANSI is supported) no restriction Microsoft Windows NT4 and earlier: 32k limit Windows 2000/XP: (ANSI) 32k limit, (Unicode) no restriction If your function is returning a empty string (""), then your buffer isn't large enough. The 2 lower bytes of lpstrFile hold the needed buffer size. Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=480941 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello Mike, Here are the limits... When selecting multiple files, the total character limit for the fil names depends on the operating system and the version of the function. Windows 95/98/Me: (only ANSI is supported) no restriction Microsoft Windows NT4 and earlier: 32k limit Windows 2000/XP: (ANSI) 32k limit, (Unicode) no restriction If your function is returning a empty string (""), then your buffe isn't large enough. The 2 lower bytes of lpstrFile hold the neede buffer size. Sincerely, Leith Ros -- Leith Ros ----------------------------------------------------------------------- Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846 View this thread: http://www.excelforum.com/showthread.php?threadid=48094 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel file size limitation | Excel Discussion (Misc queries) | |||
Userform size limitation | Excel Programming | |||
Array size limitation? | Excel Programming | |||
Selecting a file path in Excel VBA using FileOpen dialog | Excel Programming | |||
SheetSelectionChange Target size Limitation? | Excel Programming |