A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Example workbook uploaded to following link.
https://1drv.ms/u/s!ArAXPS2RpafCjjt5nIQCiC0bp-vv
In Private Sub deleteTblRows you will see the first section of code that I added between asterisk lines and the second section between hash lines.
I added Sub ResizeTblCols which is between ampersand lines.
At the top of Module 1 you will see the following Constant declared. Note the comment that it must be at top of a standard Module.
Public Const lngTempCols As Long = 3
- The value for the constant must be the largest number of columns in any of the tables that are created vertically.
- When creating more tables vertically then the left column of all tables must be the same column.
- If adding any tables horizontally then leave at least one blank column between the widest tables.
- If you add any tables with more that 3 columns then increment the value of the constant to match.
- The same Sub ResizeTblCols is called to increment the number of columns and to later decrement the number of columns.
- When it is first called to increment the number of columns, it uses the declared constant for the number of columns as the parameter for columns.
- When it is called to dwonsize again, it uses the saved variable for the initial number of columns as the columns parameter.
- The loop at the end of Private Sub deleteTblRows removes superfluous formatting that gets left behind when the table is downsized.
I have extensively commented the code to assist you to understand it but feel free to get back to me if you require further explanation.