Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 11-09-2019, 05:59 AM
p45cal's Avatar
p45cal p45cal is offline Why is listrows.add not working in excel 2007? Windows 10 Why is listrows.add not working in excel 2007? Office 2019
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

You have a named range mt so you could:
Code:
Set tbl = Range("mt").ListObject
but your mt named range is itself based on a table name.
If you know where the table is you can use any cell of that table to refer to the table:
Code:
Set tbl = Sheets("Sheet1").range("A1").listobject
Of course you can bypass setting the tbl object variable with:
Code:
Sheets("Sheet1").Range("A1").ListObject.ListRows.Add
Reply With Quote
 

Tags
vba excel



Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Outlook 2007 Search Not Working Harry Rolnick Outlook 1 04-06-2016 12:59 PM
Excel error window: Excel has stopped working MunganBrus Excel 1 01-13-2015 11:19 AM
How can I fix a print view problem that causes it to stop working.. Excel 2007, Vista birdie123 Excel 0 08-18-2012 12:02 PM
Excel 2007 to Word 2007 Labels mail merge not working rec Mail Merge 0 07-31-2010 10:45 AM
Why is listrows.add not working in excel 2007? HELP!! With Outlook 2007. STILL not working jbiggs Office 1 02-12-2009 09:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft