getting the value from regedit(not address)

  • Thread starter Thread starter monika
  • Start date Start date
M

monika

I want to get the value trapped through regedit.
IF i select a cell $B$2 and I try to get the value
throught:
RefEdit1.Value
i only get $B$2

how can i get the actaul value and not the address??

thanks
 
Range(RefEdit1)

should give you the value (assuming a single cell is selected).
 
Hi monika

MsgBox Range(RefEdit1).Cells(1).Value

--
XL2002
Regards

William

(e-mail address removed)

| I want to get the value trapped through regedit.
| IF i select a cell $B$2 and I try to get the value
| throught:
| RefEdit1.Value
| i only get $B$2
|
| how can i get the actaul value and not the address??
|
| thanks
 
thanks all ...it works wonderfully.

I had another question related to the same. I want to
generate refedits on form based on a certain array values..
like if my array has 5 i want 5 refedits to be added in my
form..how can i do this..

thanks tremendously.
 
Hi Monika -

This macro asks how many RefEdits you want, then puts that many onto the
form, each below the previous one. When the form is hidden, it gets the
addresses of all of the RefEdits and puts them into a message box.

The hard part was finding the ProgID for the RefEdit. I was looking for
something like "Forms.RefEdit.1", but it's not a MSForms control. A trip
to RegEdit show me that I needed "RefEdit.Ctrl". I wasn't even sure this
would work, because those RefEdits can be feisty little things.

Sub DrawRefEdits()
Dim i As Integer, i2 As Integer
Dim x As Single, y As Single
Dim ctlRef As Control
Dim msg As String

i2 = InputBox("How Many RefEdit Boxes?")
x = 12
y = 12

Load UserForm1
For i = 1 To i2
Set ctlRef = UserForm1.Controls.Add("RefEdit.Ctrl")
With ctlRef
.Name = "Ref" & i
.Left = x
.Top = y
y = y + .Height
End With
Next
UserForm1.Show

For i = 1 To i2
msg = msg & UserForm1.Controls("Ref" & i).Value & vbCrLf
Next
MsgBox msg
End Sub

- Jon
 
i think i wanted exaclty what u have reffered
below...thanks soooooooo much.

let me try it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top