Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I recorded the following macro that runs a query.
With ActiveSheet.QueryTables.Add(Connection:= _ "FINDER;C:\PathtoQuery\ClientTracking.dqy" _ , Destination:=Range("b3")) .Name = "ClientTracking_1" .FieldNames = False .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = True .SaveData = True .AdjustColumnWidth = False .RefreshPeriod = 0 .PreserveColumnInfo = True .Refresh BackgroundQuery:=False End With Is there some way I can make the Range portion of the macro user- selectable? I need to be able to add rows of data to the sheet one at a time. I'm thinking of the way that Excel displays a listbox that lets you return to the sheet and select a cell which is then used in the listbox. The formulabuilding tool is one place where you see this box. I haven't a clue what it's called in VBA nor how to use it. I guess an alternative would be if there's a way to automatically detect the size of the range of data (it's not named right now) and automatically append the returned data to the end of the range. Thanks. gary |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding a range | Excel Discussion (Misc queries) | |||
a simple 'sum' formula is not adding all of the data in range | Excel Discussion (Misc queries) | |||
Revisit an older post, looking for SQL help on adding range data frommany sheets to a single sheet | Excel Worksheet Functions | |||
Adding Data to a Non-Contiguous Range in Excel 2007 | Charts and Charting in Excel | |||
Adding Data from Date Range base on relative dates | Excel Worksheet Functions |