LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default inputing data

hi how can i modify this code so that the data is entered in the next empty
cell in
column a

Sub ImportDataFile()
Dim myFName As Variant
Dim myWkSht As Worksheet

Set myWkSht = ActiveSheet

ChDir "C:\mydata"
myFName = Application.GetOpenFilename(, , "Select the Data File")

If myFName = False Then
MsgBox "You pressed Cancel"
Exit Sub
Else
Workbooks.OpenText Filename:=myFName, _
StartRow:=1, DataType:=xlDelimited, Comma:=True
End If

Range("A:D").Copy _
myWkSht.Range("A:D")
ActiveWorkbook.Close False
'
End Sub

thanks for the help guys

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inputing data using vba [email protected] Excel Programming 0 January 10th 06 04:15 AM
inputing data using vba [email protected] Excel Discussion (Misc queries) 0 January 10th 06 04:09 AM
inputing data [email protected] Excel Discussion (Misc queries) 0 December 28th 05 02:01 PM
Inputing Data Dick Kusleika Excel Programming 0 August 14th 03 09:13 PM
Inputing Data DLS[_3_] Excel Programming 5 August 10th 03 02:16 AM


All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"