View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ben77[_4_] ben77[_4_] is offline
external usenet poster
 
Posts: 1
Default Importing new data


Try adding / amending the bits in *bold*

Private Sub CommandButton1_Click()

Dim intLastrow
DIM STRINPUTFILE

intLastrow = Cells(65536, 1).End(xlUp).Row
'THIS WILL ALLOW YOU TO BROWSE FOR THE FILE, RATHER THAN HAVING TO TYPE
IT AND THE PATH.
*strInputfile = Application.GetOpenFilename*

With ActiveSheet.QueryTables.Add(Connection:= _
*"TEXT;" & strInputfile *_
, Destination:=Cells(intLastrow + 1, 1))


--
ben77
------------------------------------------------------------------------
ben77's Profile: http://www.excelforum.com/member.php...o&userid=35602
View this thread: http://www.excelforum.com/showthread...hreadid=553700