Sorry, I've forgot to add one if statement.
"kounoike" <kounoike@nowherembh.nifty.com> wrote in message
news:eMu1M$6NGHA.3272@tk2msftngp13.phx.gbl...
> Hi
>
> i don't know whether this would work in your case, but give it try.
>
> Sub MultiImporttest()
> Dim flname
> Dim filename
> Dim FileNum As Integer
> Dim Counter As Long, maxrow As Long
> Dim WorkResult As String
> Dim ws As Worksheet
> On Error GoTo ErrorCheck
> maxrow = Cells.Rows.Count
> 'Ask for the name of the file.
> filename = Application.GetOpenFilename(FileFilter:="all file (*.*),*.*",
> MultiSelect:=True)
> 'Check for no entry.
> If VarType(filename) = vbBoolean Then
> Exit Sub
> End If
>
> Application.ScreenUpdating = False
> Application.EnableEvents = False
>
> Counter = Cells(Cells.Rows.Count, "a").End(xlUp).Row
'===>>add a if statement below here
If Cells(Counter, "a") <> "" Then
Counter = Counter + 1
End If
'===>>end
> For Each flname In filename
> FileNum = FreeFile()
> Open flname For Input As #FileNum
keizi
Bookmarks