View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andreas Roschger Andreas Roschger is offline
external usenet poster
 
Posts: 3
Default Import files on a mac

Hello!

I wrote on a PC a macro to import more then one file.
Here is the code to geht the paths of the files, chosen in the dialog
window:
On th PC there were no errors
-----------------
Public

Sub DateinEinlesn()
Dim varRetVal As Variant
Dim n As Integer

varRetVal = Application.GetOpenFilename( _
FileFilter:="Text-Datein (*.txt), *.txt", _
Title:="Eine oder mehrere Dateien zum Öffnen auswählen", _
MultiSelect:=True)
MsgBox (varRetVal(1) & " " & varRetVal(2))
End Sub


----------------

now i tried to use the macro on a Mac (OSX, newest Office version),
i adopt the code = (FileFilter:="Text")

-----------------
Public

Sub DateinEinlesn()
Dim varRetVal As Variant
Dim n As Integer

varRetVal = Application.GetOpenFilename( _
FileFilter:="TEXT", _
Title:="Eine oder mehrere Dateien zum Öffnen auswählen", _
MultiSelect:=True)
MsgBox (varRetVal(1) & " " & varRetVal(2))
End Sub


----------------

But there is still an error. I think that there a problems with
"MultiSelect:=True". Without this comand its possible to import one
File.

hope someone knows how to help me
thx
Andy