Hi, Not sure if this is in the right place but.......
I just wondered if its possible that when you run a query via VBA you can omit the columns headers and return the query into the specified cell.
Any help would be appreciated
Many Thanks
Hi, Not sure if this is in the right place but.......
I just wondered if its possible that when you run a query via VBA you can omit the columns headers and return the query into the specified cell.
Any help would be appreciated
Many Thanks
Hi,
Just checked one of mine and the syntax is the .TextFileStartRow
i.e.
![]()
With Sheets("mysheet").QueryTables.Add(Connection:="myconnection;" & "myfile", _ & Destination:=Sheets("Mysheet").Range("myrange").Cells(1, 1)) .TextFileStartRow = 2 'etc.. End WIth
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star iconbelow the post.
Thanks for that but it doesn't seem to work. I'm actually pulling the data from a DBF file if that makes any difference
Thanks again
Might be worth while googling to see if there's an equivalent of the .TextFilesStartRow syntax.
You could always add a line of code
Range("myimportdata").cells(1,1).EntireRow.Delete
I've found that
sorts the problem![]()
.FieldNames = False
Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks