Consulting

Results 1 to 2 of 2

Thread: Trying to store a refedit range into a cell

  1. #1

    Trying to store a refedit range into a cell

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    It worked fine for me, there must be something else.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •