vba
hi can anybody tell me how to input data with an input box asking for the
data file and then using the input statement placing the data in the first four column's of each row until the data has ended this would be a great help thanks |
vba
What is the layout of the data file? Four values then a LF, comma delimited, space or tab
delimited, or is it just....? Details needed. HTH, Bernie MS Excel MVP "ashw1984" wrote in message ... hi can anybody tell me how to input data with an input box asking for the data file and then using the input statement placing the data in the first four column's of each row until the data has ended this would be a great help thanks |
vba
the data file looks like this
10, 87, 98, 98 789, 77, 647, 748 7, 87, 87, 56 and so on "ashw1984" wrote: hi can anybody tell me how to input data with an input box asking for the data file and then using the input statement placing the data in the first four column's of each row until the data has ended this would be a great help thanks the |
vba
Sub ImportDataFile()
Dim myFName As Variant Dim myWkSht As Worksheet Set myWkSht = ActiveSheet ChDir "C:\FolderName with data files" 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 HTH, Bernie MS Excel MVP "ashw1984" wrote in message ... the data file looks like this 10, 87, 98, 98 789, 77, 647, 748 7, 87, 87, 56 and so on "ashw1984" wrote: hi can anybody tell me how to input data with an input box asking for the data file and then using the input statement placing the data in the first four column's of each row until the data has ended this would be a great help thanks the |
All times are GMT +1. The time now is 01:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com