nauthna > 22-02-13, 02:12 PM
Sub FlipVisibled(frmAny As Form, ctlAny As Control)
Dim ctl As Control
ctlAny.Visible = True
ctlAny.SetFocus
For Each ctl In frmAny.Controls
If ctl.ControlType = acCommandButton Then
If ctl.Name <> ctlAny.Name Then
ctl.Visible = Not ctl.Visible
End If
End If
Next ctl
End Sub
Noname > 22-02-13, 06:10 PM
Xuân Thanh > 23-02-13, 10:52 AM
(22-02-13, 02:12 PM)nauthna Đã viết:Mã PHP:Sub FlipVisibled(frmAny As Form, ctlAny As Control)
Dim ctl As Control
ctlAny.Visible = True
ctlAny.SetFocus
For Each ctl In frmAny.Controls
If ctl.ControlType = acCommandButton Then
If ctl.Name <> ctlAny.Name Then
ctl.Visible = Not ctl.Visible
End If
End If
Next ctl
End Sub
Cach goi ham
Call(ten form su dung, ten nut lenh)
Vi du khi click nut lenh cmdThem thi xuat hien nut cmdLuu call(me,cmdluu)
Luu y cmdLuu mac dinh visible la false nhe
Thuoc tinh enable thi tuong tu nhe cac ban
Mong giup ich cho cac ban