Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Can someone help me? I need to write THE BASIC vba procedure to extract a ..csv (first name , last name) that will be sent to colums (A10:A20) and (B10:B20). Thanks. Joe |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I used a learn macro and got the following code. You can eliminate a number
of the parameters. they aren't really needed. I added a comment to these unecessary lines Sub Macro1() ' ' Macro1 Macro ' Macro recorded 6/13/2007 by Joel ' ' With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\T EMP\f_l.csv", _ Destination:=Range("A10")) .Name = "f_l" .FieldNames = True ' .RowNumbers = False ' .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False ' .RefreshStyle = xlInsertDeleteCells ' .SavePassword = False .SaveData = True .AdjustColumnWidth = True ' .RefreshPeriod = 0 ' .TextFilePromptOnRefresh = False ' .TextFilePlatform = 437 ' .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False ' .TextFileTabDelimiter = False ' .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True ' .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1) ' .TextFileTrailingMinusNumbers = True ' .Refresh BackgroundQuery:=False End With End Sub "Jack" wrote: Hi, Can someone help me? I need to write THE BASIC vba procedure to extract a .csv (first name , last name) that will be sent to colums (A10:A20) and (B10:B20). Thanks. Joe |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual basic 6.5 question using combo box and call procedure. | Excel Discussion (Misc queries) | |||
Can I run Visual Basic procedure using Excel Visual Basic editor? | Excel Programming | |||
Importing a large amount of data using Basic | Excel Programming | |||
Basic Q: Field/Array info when importing fixed-width text files | Excel Programming | |||
Importing Data from a Stored Procedure (SQL SErver) | Excel Programming |