Good afternoon,
My best regards.
I try to be an autodidact in my life, but when it concerns to VBA has not been easy, therefore,
I really appreciate the following clarification:
How would you like to make adjustments to a document (attached file) in Excel that includes a form, I would like to understand the instructions of the macro "Sub Display ()" below.
Sub Display()
Dim Cont() As Variant
Cont = Array(0, 2, 4, 6, 9, 10, 12, 14, 16, 18, 20, 22, 23, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44)
For X = 1 To 23
Cadastro.Controls.Item(Cont(X)) = Cells(Pos, X)
Next X
Cadastro.Label27.Caption = Pos - 3 & " de " & Total
End Sub
----------------
Sub Cadastra()
Application.ScreenUpdating = False
For Each Control In Cadastro.Controls
If Left(Control.Name, 4) = "TBox" Then
Control.Value = ""
Control.Locked = True
End If
Next Control
Total = 0
X = 4
Do Until Cells(X, 1) = ""
Total = Total + 1
X = X + 1
Loop
Range(Cells(4, 1), Cells(X - 1, 23)).Select
Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Cadastro.ListBox1.Clear
Range("A4").Select
Application.ScreenUpdating = True
Pos = 4
Display
Cadastro.Show
End Sub
Best regards,
Cláudio santos
Bookmarks