Re: opening a file problem




<Help file>
..... If MultiSelect is True, the return value is an array of the selected
file names (even if only one filename is selected). Returns False if the
user cancels the dialog box.
</Help file>

So you have to deal with an array of values not a single string. Also check
for False.

NickHK

"diacci1st" <diacci1st@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:664AD003-6016-4342-8E2D-46C607A7B377@xxxxxxxxxxxxxxxx
Hi I need to get the below to work but I can not understand why it does
not
work
Could someone help?

Dim FName As Variant
FName = Application.GetOpenFilename("TXT files (*.txt),*.txt,All Files
(*.*),*.*", , , , True)
Open FName For Input As #1


Thank you



.



Relevant Pages

  • Re: Array of byte of unknown size
    ... The example given in the control's help file is for Visual Basic - so ... same thing with a variant array in Delphi ... I see out of memory errors in your future. ...
    (borland.public.delphi.language.objectpascal)
  • Re: arithenco Help
    ... You might be right about it having to do with the number of significant numbers in the array. ... I accidentally discovered that if I quantize A and then pass the quantized A with the original 'counts' to arithenco it works perfectly. ... Here's a desciption of it from the help file: ... "The vector counts represents the source's statistics by listing the number of times each symbol of the source's alphabet occurs in a test data set." ...
    (comp.soft-sys.matlab)
  • Re: Type Mismatch Error 13
    ... I tried it and it just gave a new error 'Subscript out of range.' ... You need to redim your array after the End With statement: ... but when I try to assign to an array it gives the error. ... Dim FName as Variant ...
    (microsoft.public.excel.programming)
  • Re: Determining Array Limit
    ... > Excel 2003. ... I am using the following code to read filenameinto a> variant ... > Dim Fname as Variant ... > I get an error when I try to access FName and move beyond the last array> element trying to determine how many elements there are. ...
    (microsoft.public.excel.programming)
  • Re: Tips on domain aggregate replacements
    ... array of variant of your records. ... See the help file. ... > need to run the statement from VBA. ... > I know how to run action queries using RunSQL, but can I run select ...
    (microsoft.public.access.modulesdaovba)

Loading