PDA

View Full Version : Solved: Using the RefEdit Control on a Userform



Ischyros
12-10-2008, 06:36 PM
I am trying to make a usferform that does a pretty simple task.

Using 2 RefEdit controls on the userform the user will do two things. First, they will select a range of cells to be scanned by a certain function of mine. Second, with the following RefEdit control they will choose the destination cell/range to output the results of the scan.

When a user selects a cell with RefEdit, lets say in this instance "A1" the RefEdit Value is "Sheet!$A$1", how can I use this RefEdit control to get the cell address. For example if I were to put a formula into the destination range the user selects.

Any ideas?

GTO
12-10-2008, 10:58 PM
Using 2 RefEdit controls...First, they will select a range of cells to be scanned by a certain function of mine. Second, with the following RefEdit control they will choose the destination cell/range to output the results of the scan.

When a user selects a cell with RefEdit, lets say in this instance "A1" the RefEdit Value is "Sheet!$A$1", how can I use this RefEdit control to get the cell address. For example if I were to put a formula into the destination range the user selects.

Any ideas?

Greetings,

While I'm not sure what 'scanning a certain function' will result in, as to the return value, since this is the cell address, are you more asking as to how to enter the desired formula?

Not sure if this will help, but here's an extremely simple example of two RefEdit(s), and one command button.

Private Sub CommandButton1_Click()
Range(RefEdit2).FormulaArray = "=" & RefEdit1
Unload Me
End Sub

Does that help?:dunno

Mark

Ischyros
12-11-2008, 05:52 AM
Exactly what I was looking for, thank you! How do I mark this thread as solved now?

GTO
12-11-2008, 11:10 PM
Hi Ischyros,:hi:

To mark as Solved, look above your first post in the thread, and under Thread Tools, there is a 'Mark Solved' button that only shows to the original poster.

Mark