Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excell Table to Text and Lines
#11
"sonofdoc",

I'll be glad to help, if I can. Just post your question(s) here.
Reply
#12
Here is some code to create an OPEN FILE dialog box (file browser).
Just change  csv to anything else for other file extensions.

Code:
Directory$="C:\CSVDirectory"  '<-- Directory where csv files are saved
temp = Dir( Directory$+"*.csv" )
count = 0
While temp <> ""
  count = count + 1
  temp = Dir
Wend
Dim x() As String
ReDim x(count)
DD$ =Dir( Directory$+"*.csv")
LD=Len(DD$)
FileList$(0)=Left$(DD$,LD)
For i = 1 To count-1
  DD$=Dir
  LD=Len(DD$)
  FileList$(i) = Left$(DD$,LD)
Next i
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Begin Dialog GETCSVDIALOG 130,40,200,130, "Get CSV File"
  Text 20,4,50,8,"Select File"
  ListBox 12,15,80,100,FileList$(),.LstBox
  OKButton 95,14,37,12
  CancelButton 95,30,37,12
End Dialog
Dim dlg As GetCSVDialog
Button = Dialog(dlg)
If Button = True  Then
  FileName$=Directory$+FileList$(dlg.LstBox)
Else
  End
End If
Open FileName$ For Input As #1
-
-
-
-
Close #1
Reply
#13
(11-09-2015, 03:12 PM)AlwMVMO Wrote: Here is some code to create an OPEN FILE dialog box (file browser).
Just change  csv to anything else for other file extensions.
Thanks ALW
Reply
#14
There is another version on the DCUG Members Page by Alan Cooper that does multiple folders.

Multiple Folder File Dialog Macro >
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)