Hi,
I have a userform that I want to update as soon as the code requests it, but unfortunately because the code is still looping back around it doesn't update the userform until the code has completed.
Is there a way i can force a refresh?
Attached is the code that I want to use.
I have a userform that I want to update as soon as the code requests it, but unfortunately because the code is still looping back around it doesn't update the userform until the code has completed.
Is there a way i can force a refresh?
Attached is the code that I want to use.
Code:
Public Sub CheckCollation()
CheckingCollation = True
MainForm.Info.Caption = "Collate All QR Codes"
ScanAgain:
Readers.QRCode.InputLen = 0
QRReading = ""
Do Until QRReading <> "" And Len(QRReading) = 6
QRReading = Readers.QRCode.InputData
Loop
a = Len(QRReading)
QRReading = Left(QRReading, a - 1)
For a = 1 To 6
If MainForm.Controls("QRModel" & a).Caption = QRReading Then
MainForm.Controls("collated" & a).Caption = "a"
Exit For
Else
End If
Next a
'Check all collated
CollatedAll = True
For a = 1 To 6
If MainForm.Controls("collated" & a).Visible = True Then
If MainForm.Controls("collated" & a).Caption = "r" Then
CollatedAll = False
End If
End If
Next a
If CollatedAll = True Then AllCollated = True
If AllCollated = False Then GoTo ScanAgain
End sub