I am trying to apply lastrow lastcolumn, but not getting it right.
I get the error "The extracted range has a missing or illegal field name"
Thanks
![]()
Please Login or Register to view this content.
I am trying to apply lastrow lastcolumn, but not getting it right.
I get the error "The extracted range has a missing or illegal field name"
Thanks
![]()
Please Login or Register to view this content.
Last edited by capson; 08-18-2013 at 11:46 AM.
Hi, capson,
please add code-tags to your procedure as required per Forum Rule #3.
Untested:
Ciao,![]()
Please Login or Register to view this content.
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Sorry about the code tags
Thanks for the reply HaHoBe, I tried your code I still get the same error
The code works great for a static range
![]()
Please Login or Register to view this content.
Hi, capson,
in the second example the range is set and VBA recognises that it will refer to Sheet Comments-Tableau.
With the first code you posted the range should refer to Sheet 360-Tableau but if you donīt qualify the cells as part of the range to refer to that sheet as well VBA will assume the cells to be on the active sheeet.
In the code you work with Row 2 for getting the last Column while you want to copy starting in Row 1 - that might be the reason for the error. Make sure that all columns have a header. Or maybe post a sample file to check.
Ciao,
Holger
I tried
but does not work.![]()
Please Login or Register to view this content.
I can get this to work
Clearly not getting the Column part correct![]()
Please Login or Register to view this content.
Hi, capson,
maybe check the values for both your variables before applying them (I tested the code on a sample workbook, and it works okay with my setup: range starting with A1, no empty columns/rows in data range).
Maybe try this:
And if it doesnīt work a workbook with a sample of the non working data would be needed.![]()
Please Login or Register to view this content.
Ciao,
Holger
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks