Update data in userform - checkbox

Lukael

New member
Joined
Feb 9, 2014
Messages
21
Reaction score
0
Points
0
Hello,

I have Userform with checkboxes that apply to cell values. If result correct, then checkbox is ticked.

I've pasted
Code:
VBmodeless
in code to see the table and userform, but userform doesn't update my checkboxes when I fill cell values, only when I close and reopen userform. How can I update Userform without closing It ?
 

patel

New member
Joined
Feb 20, 2014
Messages
60
Reaction score
0
Points
0
Location
Italy
Excel Version(s)
2010
can you attach a sample file ?
 

Lukael

New member
Joined
Feb 9, 2014
Messages
21
Reaction score
0
Points
0
can you attach a sample file ?


Here It is, Userforms are in B3 and B7, they both need to be updated while opened.
 

Attachments

  • Userform_Update.xlsm
    100.5 KB · Views: 96

patel

New member
Joined
Feb 20, 2014
Messages
60
Reaction score
0
Points
0
Location
Italy
Excel Version(s)
2010
set ShowModal property of the 2 userforms to false
 

Lukael

New member
Joined
Feb 9, 2014
Messages
21
Reaction score
0
Points
0
set ShowModal property of the 2 userforms to false

Done that, but nothing happens, data still updates only if I reopen Userforms - in Excel 2003, haven't try in Excel 2007 yet.
 

patel

New member
Joined
Feb 20, 2014
Messages
60
Reaction score
0
Points
0
Location
Italy
Excel Version(s)
2010
put this code in class module of sheet1
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 Then UserForm1.UserForm_Initialize
End Sub

and change
Code:
Private Sub UserForm_Initialize()
to
Code:
Public Sub UserForm_Initialize()
 

Lukael

New member
Joined
Feb 9, 2014
Messages
21
Reaction score
0
Points
0
put this code in class module of sheet1
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 Then UserForm1.UserForm_Initialize
End Sub

and change
Code:
Private Sub UserForm_Initialize()
to
Code:
Public Sub UserForm_Initialize()

Patel, that doesn't work either. I've made refresh button instead and put code:

Code:
Unload Me 
UserForm1.Show

It works, but not quite as I want, so If you or anyone else has some other suggestions, I'd be more than happy :eek:
 

patel

New member
Joined
Feb 20, 2014
Messages
60
Reaction score
0
Points
0
Location
Italy
Excel Version(s)
2010
try attached
 

Attachments

  • Userform_Update.xlsm
    103.4 KB · Views: 104

patel

New member
Joined
Feb 20, 2014
Messages
60
Reaction score
0
Points
0
Location
Italy
Excel Version(s)
2010
it works on my Excel 2010, when I change cells in column E, the checkboxes change status
 

Lukael

New member
Joined
Feb 9, 2014
Messages
21
Reaction score
0
Points
0
it works on my Excel 2010, when I change cells in column E, the checkboxes change status

I have Excel 2003 now, with compatibility pack for 2007, and It's not working. Actually It might work for you on first Userfom which I deleted from my project. I need to update second one, which has also listbox that needs to be populated, not just checkboxes.

Thanks !
 
Top