I have a couple UserForms. One is used to enter and edit data (called Settings), and one that stays open at all times and is used strictly to monitor data (called SubCodeReference).
What I need to happen is have the SubCodeReference UserForm refresh or re-initialize when the macro below is run:
I added
but it doesn't work.
Is it possible to refresh/repaint/re-initialize a UserForm from another UserForm?
What I need to happen is have the SubCodeReference UserForm refresh or re-initialize when the macro below is run:
VBA Code:
Private Sub cmdUpdateSub_Click()
Dim SubName_id As String
SubName = Trim(SubName.Text)
LastRow = Worksheets("Subdivisions").Cells(Rows.Count, 6).End(xlUp).Row
For i = 1 To LastRow
If Worksheets("Subdivisions").Cells(i, 6).Value = SubName Then
Worksheets("Subdivisions").Cells(i, 6).Value = EditSubName.Text
Worksheets("Subdivisions").Cells(i, 2).Value = SubCode.Text
Worksheets("Subdivisions").Cells(i, 3).Value = FalconCode.Text
Worksheets("Subdivisions").Cells(i, 5).Value = SubInitials.Text
Worksheets("Subdivisions").Cells(i, 15).Value = FloorsSelection.Text
Worksheets("Subdivisions").Cells(i, 16).Value = EES_BW_Select.Text
Worksheets("Subdivisions").Cells(i, 8).Value = FieldManager.Text
End If
Next
With Me
.SubName.Value = Null
.EditSubName = ""
.SubCode.Value = ""
.SubInitials.Value = ""
.FloorsSelection.Value = Null
.FieldManager.Value = Null
End With
SubCodeReference.Repaint
UserForm_Initialize
Call cmdResetSub_Click
Call ReplyEditSub
End Sub
I added
VBA Code:
SubCodeReference.Repaint
Is it possible to refresh/repaint/re-initialize a UserForm from another UserForm?