Pop up text box deleting text in linked cell

excelnat

New Member
Joined
May 8, 2014
Messages
12
Hi, Hopefully this is a quick one. I have a pop up UserForm1 which contains 2 text boxes which are linked to B33 and D33 each of Sheet1. So the UserForm1 appears and the contents of these cells are displayed. B33 and D33 are formulas and the text boxes show the results of those formulas, which is what I want. However, when I click OK to close the UserForm1, the text boxes overwrite the contents of B33 and D33 with the results of the formula only, so no formula. Can anyone tell me how to get around this? I'm using 'Unload UserForm1' to close it if that's a problem, but I don't know what else to use if it is? Thanks, EXCELNAT.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi, If I understand correctly - you need to remove the link from the text boxes and instead populate them using the forms Initialize event.

For example:

Code:
Private Sub UserForm_Initialize()
Me.TextBox1.Value = Sheets("Sheet1").Range("B33").Value
Me.TextBox2.Value = Sheets("Sheet1").Range("D33").Value
End Sub
 
Upvote 0

Forum statistics

Threads
1,222,827
Messages
6,168,480
Members
452,192
Latest member
FengXue

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