![]() |
Create Table with the range of selected cells
Hi guys!
I need some help with setting up vba that would insert a table with headers, with the name of current time and most importantly range of the selected cells. Thanks for any help. Anton. |
Create Table with the range of selected cells
Have you tried the macro recorder?
If you run into any issues, post back with the code and expected results. Gord On Sun, 29 Jan 2012 18:55:29 +0000, antik888 wrote: Hi guys! I need some help with setting up vba that would insert a table with headers, with the name of current time and most importantly range of the selected cells. Thanks for any help. Anton. |
Create Table with the range of selected cells
Return the range of selected cells:
Selection.Address |
Create Table with the range of selected cells
Return the range of selected cells:
Selection.Address Will return a string with the selected area address |
Quote:
The code looks like this Code:
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A1:A2"), , xlYes).Name = _ |
Create Table with the range of selected cells
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A1:A2"), , xlYes).Name = _
Format(Now(),"yyyy/mm/dd") |
Create Table with the range of selected cells
Like this:
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A1:A2"), , xlYes).Name = _ Format(Now(),"yyy/mm/dd") |
Create Table with the range of selected cells
Like this:
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A1:A2"), , xlYes).Name = _ Format(Now(),"yyy/mm/dd") |
All times are GMT +1. The time now is 06:59 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com