#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Table Name

How do I get the name of the current table? I am talking about when I use
the HomeFormat as Table (In the Styles section) and then format data as a
table. Typically Excel assigns the name Table1, Table2, etc. How can I
determine the table name in VBA?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Table Name

here you go
ActiveSheet.ListObjects.Add(xlSrcRange,
Range(ActiveCell.CurrentRegion.Address), , xlYes).Name = "ABCD1"

But the only catch over here is your cursor should be with in the table.
I mean if you have data in range "A1:E40", then your cursor should be with
in this range. If the cursor is in cell F3 then this code will work but not
as you want it to.

regards
Heera Chavan

"Mike H." wrote:

How do I get the name of the current table? I am talking about when I use
the HomeFormat as Table (In the Styles section) and then format data as a
table. Typically Excel assigns the name Table1, Table2, etc. How can I
determine the table name in VBA?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivit table- cell on spread sheet referencing pivot table field David M Charts and Charting in Excel 2 August 18th 07 07:46 PM
entry removed from source table remains in pivot table pull down EL in Melb. Excel Worksheet Functions 1 September 6th 06 07:59 AM
PIVOT TABLE - Summary Table into a Databasae Table. sansk_23 Excel Worksheet Functions 4 May 9th 05 07:45 AM
VBA Code for a pivot table to open database and to reference table current page Pete Straman Straman via OfficeKB.com Excel Programming 0 February 21st 05 03:57 AM
create a source table from a special pasted value dynamic crossed table Tom Ogilvy Excel Programming 0 September 29th 03 08:59 PM


All times are GMT +1. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"