YetAnotherDave
New Member
- Joined
- Sep 29, 2022
- Messages
- 2
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Everyone is familiar with the "Paste Column Widths" command that will take information from the clipboard and use it to transfer the column widths of a copied range to another range without including the actual data from the cells that were copied. Thus, it seems to me that when a range of cells are copied using the clipboard, information about the cells is stored.
But what about row heights? It is fairly easy to write a sub or function that will take a range of cells and another cell as input to transfer the row heights of the first range to a location starting at the second input cell. I wrote a simple sub that does exactly this, but I was thinking that it would be an improvement if I could get it to work more like the built-in Excel routine for pasting column widths. In other words, I want to use the same clipboard data that is already stored when I cut or copy a range of cells to paste the row heights.
Since the clipboard stores column width data along with cell values, does it also store the row heights or some means of reproducing them from the original range?
Does anyone know if it is possible to use VBA to transfer row height information using the clipboard in the same manner as Excel does with the column widths? Or should I just live with copying the source range twice - once for the clipboard operations and then again as part of a VBA sub to set the row heights?
If it is possible, I don't need anyone to write the code for me, I just need to know how to access cell information from the clipboard and I can take it from there. My thanks to anyone who knows the answer and can help.
But what about row heights? It is fairly easy to write a sub or function that will take a range of cells and another cell as input to transfer the row heights of the first range to a location starting at the second input cell. I wrote a simple sub that does exactly this, but I was thinking that it would be an improvement if I could get it to work more like the built-in Excel routine for pasting column widths. In other words, I want to use the same clipboard data that is already stored when I cut or copy a range of cells to paste the row heights.
Since the clipboard stores column width data along with cell values, does it also store the row heights or some means of reproducing them from the original range?
Does anyone know if it is possible to use VBA to transfer row height information using the clipboard in the same manner as Excel does with the column widths? Or should I just live with copying the source range twice - once for the clipboard operations and then again as part of a VBA sub to set the row heights?
If it is possible, I don't need anyone to write the code for me, I just need to know how to access cell information from the clipboard and I can take it from there. My thanks to anyone who knows the answer and can help.