Hỏi về code in VBA (1 người xem)

Liên hệ QC

Người dùng đang xem chủ đề này

longdpph00858

Thành viên mới
Tham gia
5/11/11
Bài viết
6
Được thích
0
Mình có đoạn code này (mình mới tập VBA trong ngày hôm nay thôi vì thấy rất hay và chuyên nghiệp):
Private Sub CommandButton2_Click()If yc1 = True Then
Application.Visible = True
Unload Me
Unload frmDemo
Sheets("tonghop").Select
ActiveWindow.SelectedSheets.PrintPreview
frmDemo.Show
End If
If yc2 = True Then
Application.Visible = True
Unload Me
Unload frmDemo
Sheets("chitiet").Select
ActiveWindow.SelectedSheets.PrintPreview
frmDemo.Show
End If
If yc3 = True Then
Application.Visible = True
Unload Me
Unload frmDemo
Sheets("KHO").Select
ActiveWindow.SelectedSheets.PrintPreview
frmDemo.Show
End If
If yc4 = True Then
Application.Visible = True
Unload Me
Unload frmDemo
Sheets("LAILO").Select
ActiveWindow.SelectedSheets.PrintPreview
frmDemo.Show
End If
End Sub
- mình muốn hỏi code: If yc1 = True Then có nghĩa là gì? yc1, yc2,.. là gì vậy?
- Application.Visible = True code này dung làm gì và ý nghĩa ra sao?
 
Web KT

Bài viết mới nhất

Back
Top Bottom