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: 54
Default How can I automatically import into next empty row

I have a macro which automatically imports the contents of a .csv file.
However, it imports only into the row which is hardcoded. How do I get the
import to start in Column A of the next empty row? The import should start
in Column A of the next empty row and fill in from there. Here is my
code...

With
ActiveSheet.QueryTables.Add(Connection:="TEXT;c:\U PS_CSV_EXPORT.csv",Destination:=Range("A8"))
.Name = "UPS_CSV_EXPORT"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With

--
Thanks!


 
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
Automatically hide a row if it is empty Vil Excel Discussion (Misc queries) 1 November 19th 08 11:10 AM
Automatically copy formulae to next empty row DDawson Excel Programming 12 January 8th 08 03:43 PM
Automatically selecting the next empty row Alec H Excel Discussion (Misc queries) 2 March 1st 06 09:21 AM
Automatically select empty rows Michael S. Excel Worksheet Functions 2 October 18th 05 09:26 AM
SKIP EMPTY ROWS FROM IMPORT R.V. DEURSEN Excel Programming 4 June 28th 04 07:17 PM


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

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

About Us

"It's about Microsoft Excel"