Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
right click on the query in the worksheet and choose to edit the query.
Turn the macro recorder on while you do it manually if you are looking for code. -- Regards, Tom Ogilvy "EBrowne" wrote in message ... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey, thanks for the reply. My long post got cut, it seems. I've written a
very long, involved macro that imports data from hundreds of data files. Unfortunately, I've got multiple formats, including fixed width columns, and I need to excerp various numbers of rows and columns. Unfortunately, the top row is not always the labels row, and the labels often have spaces in them, so using spaces as a delimiter in fixed column formats screws up the labels. So instead of hard-wiring the data import into my code, I would like to change the queries in the template, and then simply change the data file source with the code. However, when I change the .Connection property, it blanks out all the other settings in the querytable definitions. I've watched them go blank in the locals window. And when I change the .SourceDataFile, it has no effect on the ..Connection property, so the same default file keeps being imported. Any ideas? "Tom Ogilvy" wrote: right click on the query in the worksheet and choose to edit the query. Turn the macro recorder on while you do it manually if you are looking for code. -- Regards, Tom Ogilvy "EBrowne" wrote in message ... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can't say about your other properties, but you have to change the
connection property and the sql property. I'm using Excel 97, so I don't have a sourcedatafile property. Maybe you just want to record creating your querytable, then generalize the code so you can feed different arguments to it. Delete the table between each creation. That will record setting the properties. -- Regards, Tom Ogilvy "EBrowne" wrote in message ... Hey, thanks for the reply. My long post got cut, it seems. I've written a very long, involved macro that imports data from hundreds of data files. Unfortunately, I've got multiple formats, including fixed width columns, and I need to excerp various numbers of rows and columns. Unfortunately, the top row is not always the labels row, and the labels often have spaces in them, so using spaces as a delimiter in fixed column formats screws up the labels. So instead of hard-wiring the data import into my code, I would like to change the queries in the template, and then simply change the data file source with the code. However, when I change the .Connection property, it blanks out all the other settings in the querytable definitions. I've watched them go blank in the locals window. And when I change the .SourceDataFile, it has no effect on the .Connection property, so the same default file keeps being imported. Any ideas? "Tom Ogilvy" wrote: right click on the query in the worksheet and choose to edit the query. Turn the macro recorder on while you do it manually if you are looking for code. -- Regards, Tom Ogilvy "EBrowne" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Bar width on existing chart changes when changing source data | Charts and Charting in Excel | |||
import data from txt file to an existing excel file | Excel Discussion (Misc queries) | |||
import data into existing excel file | Excel Discussion (Misc queries) | |||
import info from outlook to existing excel file | Excel Worksheet Functions | |||
Using Querytable.add to import data from a closed workbook | Excel Programming |