![]() |
Ranges - Location InTable
According to my book this command is read only, and returns the location of
the Upper Left Corner of a Range. It returns Type "XlLocationInTable" I believe. Can anybody assist as this would be a very useful command. I have tried setting the returned value to type Variant but with no sucess - my code was Dim TRows As Integer Dim MyLocat As Variant With Worksheets("Misc").Range("Fred") TRows = .Rows.Count ' dummy test instruction MyLocat = .LocationInTable. End With Any asistancve much appreciated. |
Ranges - Location InTable
Just thought - Should have said that am using XL 2000.
"Gandalph" wrote: According to my book this command is read only, and returns the location of the Upper Left Corner of a Range. It returns Type "XlLocationInTable" I believe. Can anybody assist as this would be a very useful command. I have tried setting the returned value to type Variant but with no sucess - my code was Dim TRows As Integer Dim MyLocat As Variant With Worksheets("Misc").Range("Fred") TRows = .Rows.Count ' dummy test instruction MyLocat = .LocationInTable. End With Any asistancve much appreciated. |
Ranges - Location InTable
If you just want the upper-left cell then
Worksheets("Misc").Range("Fred").Cells(1).address( ) 'assuming a contiguous range would work. If LocationInTable is really what you want: http://msdn2.microsoft.com/en-us/lib...le(VS.80).aspx Note it seems to apply only to pivot tables. Tim "Gandalph" wrote in message ... According to my book this command is read only, and returns the location of the Upper Left Corner of a Range. It returns Type "XlLocationInTable" I believe. Can anybody assist as this would be a very useful command. I have tried setting the returned value to type Variant but with no sucess - my code was Dim TRows As Integer Dim MyLocat As Variant With Worksheets("Misc").Range("Fred") TRows = .Rows.Count ' dummy test instruction MyLocat = .LocationInTable. End With Any asistancve much appreciated. |
All times are GMT +1. The time now is 06:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com