|
-
Mar 29th, 2021, 03:21 AM
#1
Thread Starter
New Member
[RESOLVED] Multiple dynamic tables VBA
I am a beginner when it comes to VBA. I want to create as many dynamic table as a given value X. The tables should be created one near the other. Each row of the table should have at least a cell with text and a formula. This is what I have done already:
Private Sub CommandButton1_Click()
Dim t As ListObject
Dim c As Range
Sheet4.Activate
Set t = Sheet4.ListObjects.Add(xlSrcRange, Sheet4.Range("A2").Resize(37, 5), , xlNo)
t.ListColumns(1).Name = "Samples"
t.ListColumns(2).Name = "Activities"
t.ListColumns(3).Name = "Discipline"
t.ListColumns(4).Name = "Activity"
t.ListColumns(5).Name = "Duration(h)"
End Sub
I don't know how can I make the loop to put the tables on columns, not rows and how to add names and formulas in the table rows dynamically.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|