Checkbox display cell data realtime

Feongxd

New Member
Joined
Jan 24, 2017
Messages
13
hi, i need help with this

I have a checkbox "aa" when check, it will display in cell F5 then value in B2
But when i change B2 without unchecking "aa" Cell F5 still shows the old value.
Im using checkbox activeX.

Can it be done as when i change a new value into B2, F5 will auto update without having to uncheck and check the box again.

Code:
Private Sub CheckBox1_Click()
Set ws = ThisWorkbook
Set aa = CheckBox1
    If aa.Value = True Then Range("F5").Value = ws.Sheets("Sheet2").Range("B2")
    If aa.Value = False Then Range("F5").Value = Null
End Sub
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Welcome to the forum.

You could put a formula into the cell instead of a value:

Code:
Range("F5").Formula = "=Sheet2!B2"

rather than this:

Code:
Range("F5").Value = ws.Sheets("Sheet2").Range("B2")
 
Upvote 0

Forum statistics

Threads
1,215,336
Messages
6,124,334
Members
449,155
Latest member
ravioli44

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