Thread: Importing File
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
infojmac[_9_] infojmac[_9_] is offline
external usenet poster
 
Posts: 1
Default Importing File


Hi,

I have the following which allows the user to browse and gives me th
filename

Public Sub Importflu()
Dim myfile As Variant


myfile = Application.GetOpenFilename _
(filefilter:="CSV Files(*.csv),*.csv,All Files (*.*),*.*")


End Sub

What i want is it to then take the data from this file and copy it int
the active workbook - i used the recorder to import specific data bu
couldn't marry up my 'myfile' path with the connection:= bit.

So the user should just select the appropiate file and it copies ou
the data and sticks it in the new workbook - then i can do the othe
sorting macros etc in that workbook.

Any help much appreciated it seems like it should be simple but i'v
been trying all mornniing!

Cheer

--
infojma
-----------------------------------------------------------------------
infojmac's Profile: http://www.excelforum.com/member.php...fo&userid=1078
View this thread: http://www.excelforum.com/showthread.php?threadid=27204