Swap around Equal Sign

kpark91

Well-known Member
Joined
Jul 15, 2010
Messages
1,582
Hello, I am currently using VBA code that requires a variable be set to a userform object's value.

Rich (BB code):
    ws.Range("A1").Value = Me.a.Text
    ws.Range("B1").Value = Me.b.Text
    ws.Range("C1").Value = Me.c.Text
    ws.Range("D1").Value = Me.d.Text
    .
    .

They have been copy+pasted onto a excel spreadsheet into columnA and there are quite alot of these tedious lines.

Now, I need a formula (preferably) to swap these around the equal sign.
and show it in columnB.

So, it would look like
Rich (BB code):
    Me.a.Text = ws.Range("A1").Value   
    Me.b.Text = ws.Range("B1").Value
    Me.c.Text = ws.Range("C1").Value 
    .
    .

Thank you in advance,
Kpark.

PS: There will only be one equal sign so there will be no "=" in any of the codelines I want to swap.
For example,
Rich (BB code):
None of these
Worksheets("=Hello").Range("A1").Value = "Blarg="
 
Now, I have a really good idea on how it works.
However, I don't think TaggedValues is provided in excel VBA.
Is there a reference I need to add for it?

If not, I can attempt to code it myself as a side-project :D (for now).

Thank you again for the handy trick!
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
The TaggedValue and TaggedValues class modules are from that book. In the past I have searched for their code online and have not found it (the code is in the CD that comes with the book). Since I cannot find an open source and since I didn't personally write the code, I do not feel comfortable publishing code that other developers wrote. But if you have any kind of experience with class modules, it's not terribly hard to work out.
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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