Hi,
I was hoping someone would take pity on me and help explain what's going on in some code I've been reviewing - i literally have no idea
The coding is from an application that uses a form to add a new set of data to a table. I've been teaching myself VBA so have been breaking down and building my own from scratch and some of its got me baffled.
Once the user has entered the data and clicked the submit button, it runs a Sub which calls three other Subs: WriteToTable, ExpandTable & SortTable.
WriteToTable I've got (just) as it just adds the entered data to the next available blank row. I've not looked too hard at SortTable, but that appears to be just picking a column and sorting the data based on that criteria. What I don't get is the commands in ExpandTable.
The Code is:
What on earth is going on here???Please Login or Register to view this content.
I can't find a description i can understand of RefersToR1C1 anywhere so haven't got the foggiest about what this line is doing
The Table its expanding is currently A1:D1 when no data is held. When data is added it fills row 2; so I'm assuming Its somehow telling it to add the new row to the Table and "expand" it so its now held as A1:D2?
If someone could put what's happening into plain English for me it would be appreciated.
Thanks
Bookmarks