RefEdit modify user input string

hiici

New Member
Joined
Jul 14, 2017
Messages
14
Hi VBA Gurus,

I am trying to take the cell a user clicks and allow them to add to the input box string. I have figured out how to strip the tab name and just show the Cell after selection but when I try to modify the input box, it simply overwrites it.

For example say I want the RefEdit box to contain the string A1+B1+C1.

When I select A1, that is what shows in the box, then I add a plus sign and highlight B1 and the result is simply overwritten with B1.

I've tried a bunch of the RefEdit controls and still can't figure out which one I need to use to accomplish this. This is probably very simple but I still cant find where I would control this.

thx for any help.

mike
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
See if this does what you need

Code:
Sub aTest()
    Dim myString As String
    myString = Application.InputBox("Select Cells", Type:=0)
    myString = Mid(Application.ConvertFormula(myString, xlR1C1, xlA1), 2)
    MsgBox myString
End Sub

When the Input Box opens
Select A1
type +
Select B1
type +
Select C1
OK

M.
 
Upvote 0
that works perfect thanks Marcelo. I guess it is those RefEdits that make life difficult because this was too with your method :)
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top