Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getting the value from regedit(not address)

34 views
Skip to first unread message

monika

unread,
Mar 30, 2004, 11:30:45 PM3/30/04
to
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

Vasant Nanavati

unread,
Mar 30, 2004, 11:41:28 PM3/30/04
to
Range(RefEdit1)

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

--

Vasant

"monika" <anon...@discussions.microsoft.com> wrote in message
news:117fd01c416d8$ef053760$a001...@phx.gbl...

William

unread,
Mar 30, 2004, 11:44:58 PM3/30/04
to

Hi monika

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

--
XL2002
Regards

William

willw...@yahoo.com

"monika" <anon...@discussions.microsoft.com> wrote in message
news:117fd01c416d8$ef053760$a001...@phx.gbl...

mudraker <>

unread,
Mar 30, 2004, 11:42:44 PM3/30/04
to
can you post your code that sets RefEdit1


---
Message posted from http://www.ExcelForum.com/

Monika

unread,
Mar 31, 2004, 12:02:47 AM3/31/04
to
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.

>.
>

Jon Peltier

unread,
Mar 31, 2004, 12:57:32 PM3/31/04
to
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
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

monika

unread,
Mar 31, 2004, 9:04:28 PM3/31/04
to
i think i wanted exaclty what u have reffered
below...thanks soooooooo much.

let me try it!

>.
>

0 new messages