Is there a way to "Convert Table to Range" in VBA?

TomCon

Active Member
Joined
Mar 31, 2011
Messages
385
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
If i use the "Format as Table" command and record it, VBA records Activesheet.ListObjects.Add...

But, if i then use the Table Tools Ribbon, "Convert To Range", nothing is recorded. (Tried it several times, always the same).

Can i do the effect of the command "Convert To Range" in VBA in any way?

Thanks!
Tom
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Assuming you have it selected:
Code:
Selection.ListObject.Unlist
 
Upvote 0
If you know a particular cell is in the table
Code:
Range("K1").ListObject.Unlist
 
Upvote 0
Yes, either "Selection" or "Range" does it. Funny they don't record it. I guess its a small bug!
Thanks very much!
tom
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top