TY MrProgrammer. Of course "I know how to do that using your keyboard and mouse?"
I had previously done a recording, but the resulting code is rather long-winded and other posters in this forum advise against using recorded code. Also, as I have done a lot of programming in VBA over the years and some in OpenOffice for Base, I wanted something easy to understand for others and concise, so Andrew Pitonyak's suggestion looked ideal. And I shall need to use the code many times in my application on different sheets, so more concise the better..
It seemed to me that all I needed to do was replace
.celladdress with something like
.values in the line
Code: Select all
oCellCpy = oSheet1.getCellByPosition(oRangeCpy.StartColumn,_
oRangeCpy.StartRow).CellAddress
would be straightforward, but clearly either there is no such option or no one seems to know what it is.
So I shall have to stick with the recording I made earlier.