Reputation: 1
I want to define a named range from a table's databodyrange. I manage to get the address of the databodyrange and can select this range
Dim acSh As Worksheet
Dim oLo As ListObject
Sub StelDatabereikIn()
Set acSh = ActiveSheet
For Each oLo In acSh.ListObjects
Application.Goto oLo.Range
MsgBox "Databodyrange is " & oLo.DataBodyRange.Address
oLo.DataBodyRange.Select
I would like to define a named range based on the databodyrange.
Upvotes: 0
Views: 274
Reputation: 34075
Not sure why, since it already is a named range, but you can use:
oLo.DataBodyRange.Name = "whatever"
Upvotes: 0