Hi everybody,
How can I write the saved cell range of a variable in a cell?
For example:
Dim rng As Range 'this works fine
Set rng = Selection 'this works fine
Range("O1").Value = rng 'this does not work, the cell is still blank after that
Also if I use a msgBox to see if the range is getting stored in my rng var, its shown.
So it seems to be an issue with the last line, is it even possible to write a range var in to a cell?
I somehow need a solution to save the range of already selected cells in a worksheet to a variable.
Then I want to write the content of the variable (for example: A1:B5) in to a cell in the same worksheet.
Background: I want to use the cell range later on for a range selection, so after the steps above, I want to save the cell range(example: A1:B5) again in a var to use for selection.
The problem is that, the workbook is getting closed in between saving and using the content of variable, so because of that I want to go for this workaround.
Bookmarks