PDA

View Full Version : Trying to store a refedit range into a cell



Noivilbo
12-27-2011, 05:04 PM
Hi Guys,

I have a userform which requests the user to select several ranges through refedit boxes (several on the same userform).

As far as I understood, these refedit boxes return a string. I used range(Refedit1.Value) to get the range & store it in a range variable, which all works perfectly.

However, I would like to store the range in a cell on an excel worksheet, in order to be able to restore this value to the refedit box when the user opens it again (through the initialize procedure).

But when I try to save the string to my worksheets, nothing happens in the worksheet, the userform closes and excel crashes when I load it again.
F.e:
Code:

Thisworkbook.sheets(1).Cells(1,1).Value = Refedit1.Value


What am I doing wrong?

Thx

xld
12-27-2011, 05:23 PM
It worked fine for me, there must be something else.