Thứ Sáu, 8 tháng 1, 2021

Code tạo thanh menu Sổ nhật ký kế toán & quản trị kho hàng theo dõi bằng Excel

1. Phần tạo menu Sổ kế toán máy theo hình thức Nhật Ký Chung :
 
Sub M_TAOMENU()
On Error Resume Next
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Delete
CommandBars("WORKSHEET MENU BAR").Controls. _
Add(Type:=msoControlPopup, BEFORE:=1).Caption = "MENU NHAT KY CHUNG"
'MENU CON NHAP DU LIEU
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlPopup, BEFORE:=1).Caption = "CHUNG TU NHAT KY CHUNG"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=1).Caption = "NHAP CHUNG TU MOI"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=2).Caption = "SUA CHUNG TU"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=3).Caption = "XOA CHUNG TU"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=4).Caption = "DANH MUC MA PHAN LOAI TK"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=5).Caption = "DANH MUC KHACH HANG"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=6).Caption = "DANH MUC HANG HOA"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=7).Caption = "DANH MUC DON HANG"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=8).Caption = "SO DU TAI KHOAN DAU KY"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=9).Caption = "SO DU CONG NO DAU KY TONG HOP"
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=10).Caption = "SO DU CONG NO DAU KY CHI TIET"
Set BAR_NKC = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG").Controls("CHUNG TU NHAT KY CHUNG")
With BAR_NKC
.Controls("NHAP CHUNG TU MOI").OnAction = "SHOW_F_CTKT"
.Controls("SUA CHUNG TU").OnAction = "SHOW_F_SPNKC"
.Controls("XOA CHUNG TU").OnAction = "SHOW_F_XPNKC"
.Controls("DANH MUC MA PHAN LOAI TK").OnAction = "SHOW_F_MPLTK"
.Controls("DANH MUC KHACH HANG").OnAction = "SHOW_F_MK"
.Controls("DANH MUC HANG HOA").OnAction = "SHOW_F_DMHH"
.Controls("DANH MUC DON HANG").OnAction = "SHOW_F_DMDH"
.Controls("SO DU TAI KHOAN DAU KY").OnAction = "SHOW_F_SDTK"
.Controls("SO DU CONG NO DAU KY TONG HOP").OnAction = "SHOW_F_SDCNDK"
.Controls("SO DU CONG NO DAU KY CHI TIET").OnAction = "SHOW_F_SDCNDKCT"
End With
'======================================
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=2).Caption = "CHON SHEET"
Set BAR_CS = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_CS
.Controls("CHON SHEET").OnAction = "SHOW_F_CHONSHEET"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=3).Caption = "IN PHIEU"
Set BAR_IP = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_IP
.Controls("IN PHIEU").OnAction = "SHOW_F_MP"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=4).Caption = "NHAP XUAT TON"
Set BAR_NXT = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_NXT
.Controls("NHAP XUAT TON").OnAction = "SHOW_F_XNT"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=5).Caption = "NHAT KY CHUNG 1 COT"
Set BAR_NKC1COT = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_NKC1COT
.Controls("NHAT KY CHUNG 1 COT").OnAction = "SHOW_F_SNKC1COT"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=6).Caption = "SO NHAT KY CHUNG"
Set BAR_SNKC = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_SNKC
.Controls("SO NHAT KY CHUNG").OnAction = "SHOW_F_SNKC"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=7).Caption = "SO CHI TIET"
Set BAR_SCT = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_SCT
.Controls("SO CHI TIET").OnAction = "SHOW_F_SCT"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=8).Caption = "SO CONG NO 1 DOI TUONG"
Set BAR_CN1DT = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_CN1DT
.Controls("SO CONG NO 1 DOI TUONG").OnAction = "SHOW_F_SCN1DT"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=9).Caption = "SO CONG NO NHIEU DOI TUONG"
Set BAR_SCN = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_SCN
.Controls("SO CONG NO NHIEU DOI TUONG").OnAction = "SHOW_F_SCN"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=10).Caption = "SO DOI CHIEU CONG NO"
Set BAR_SDCCN = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_SDCCN
.Controls("SO DOI CHIEU CONG NO").OnAction = "SHOW_F_SDCCN"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=11).Caption = "BAO CAO TAI CHINH"
Set BAR_BCTC = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_BCTC
.Controls("BAO CAO TAI CHINH").OnAction = "SHOW_F_BCTC"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=12).Caption = "BAO CAO BAN HANG - MUA HANG"
Set BAR_BCMB = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_BCMB
.Controls("BAO CAO BAN HANG - MUA HANG").OnAction = "SHOW_F_BCMB"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=13).Caption = "BAO CAO PIVOT"
Set BAR_BCPV = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_BCPV
.Controls("BAO CAO PIVOT").OnAction = "SHOW_F_INBAOCAO"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=14).Caption = "NAM THANG LAM VIEC"
Set BAR_NTLV = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_NTLV
.Controls("NAM THANG LAM VIEC").OnAction = "SHOW_F_NTLV"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=15).Caption = "KHOA SO"
Set BAR_KS = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_KS
.Controls("KHOA SO").OnAction = "SHOW_F_KHOASO"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=16).Caption = "MAT KHAU"
Set BAR_PS = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_PS
.Controls("MAT KHAU").OnAction = "SHOW_F_PS"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=17).Caption = "TONG PHIEU"
Set BAR_TP = CommandBars("WORKSHEET MENU BAR").Controls("MENU NHAT KY CHUNG")
With BAR_TP
.Controls("TONG PHIEU").OnAction = "SHOW_F_SUM_NKC"
End With
End Sub
 
2. Phần tạo menu quản trị kho hàng theo phương pháp bình quân gia quyền :
 
Sub M_TAOMENU()
On Error Resume Next
'Tạo thanh menu Quản trị kho hàng
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Delete
CommandBars("WORKSHEET MENU BAR").Controls. _
Add(Type:=msoControlPopup, BEFORE:=1).Caption = "MENU QUAN TRI KHO"
'MENU CON NHAP DU LIEU
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlPopup, BEFORE:=1).Caption = "CHUNG TU KHO HANG"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls.Add(Type:=msoControlPopup, BEFORE:=1).Caption = "NHAP XUAT VAN - VAT TU"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=1).Caption = "PHIEU NHAP VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=2).Caption = "PHIEU XUAT VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=3).Caption = "PHIEU CHUYEN KHO VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=4).Caption = "PHIEU NHAP DON GIA TAM VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=5).Caption = "PHIEU XUAT DON GIA TAM VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=6).Caption = "PHIEU CHUYEN KHO DON GIA TAM VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=7).Caption = "PHIEU NHAP USD"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=8).Caption = "PHIEU XUAT USD"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU").Controls.Add(Type:=msoControlButton, BEFORE:=9).Caption = "PHIEU CHUYEN KHO USD"
Set BAR_NXV = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT VAN - VAT TU")
With BAR_NXV
.Controls("PHIEU NHAP VND").OnAction = "PHIEUNHAPVAN_VND"
.Controls("PHIEU XUAT VND").OnAction = "PHIEUXUATVAN_VND"
.Controls("PHIEU CHUYEN KHO VND").OnAction = "PHIEUCHUYENKHOVAN_VND"
.Controls("PHIEU NHAP USD").OnAction = "PHIEUNHAPVAN_USD"
.Controls("PHIEU XUAT USD").OnAction = "PHIEUXUATVAN_USD"
.Controls("PHIEU CHUYEN KHO USD").OnAction = "PHIEUCHUYENKHOVAN_USD"
.Controls("PHIEU NHAP DON GIA TAM VND").OnAction = "PHIEUNHAPVAN_DGT_VND"
.Controls("PHIEU XUAT DON GIA TAM VND").OnAction = "PHIEUXUATVAN_DGT_VND"
.Controls("PHIEU CHUYEN KHO DON GIA TAM VND").OnAction = "PHIEUCHUYENKHOVAN_DGT_VND"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls.Add(Type:=msoControlPopup, BEFORE:=2).Caption = "NHAP XUAT PHOI"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT PHOI").Controls.Add(Type:=msoControlButton, BEFORE:=1).Caption = "PHIEU NHAP VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT PHOI").Controls.Add(Type:=msoControlButton, BEFORE:=2).Caption = "PHIEU XUAT VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT PHOI").Controls.Add(Type:=msoControlButton, BEFORE:=3).Caption = "PHIEU CHUYEN KHO VND"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT PHOI").Controls.Add(Type:=msoControlButton, BEFORE:=4).Caption = "PHIEU NHAP USD"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT PHOI").Controls.Add(Type:=msoControlButton, BEFORE:=5).Caption = "PHIEU XUAT USD"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT PHOI").Controls.Add(Type:=msoControlButton, BEFORE:=6).Caption = "PHIEU CHUYEN KHO USD"
Set BAR_NXP = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls("NHAP XUAT PHOI")
With BAR_NXP
.Controls("PHIEU NHAP VND").OnAction = "PHIEUNHAPPHOI_VND"
.Controls("PHIEU XUAT VND").OnAction = "PHIEUXUATPHOI_VND"
.Controls("PHIEU CHUYEN KHO VND").OnAction = "PHIEUCHUYENKHOPHOI_VND"
.Controls("PHIEU NHAP USD").OnAction = "PHIEUNHAPPHOI_USD"
.Controls("PHIEU XUAT USD").OnAction = "PHIEUXUATPHOI_USD"
.Controls("PHIEU CHUYEN KHO USD").OnAction = "PHIEUCHUYENKHOPHOI_USD"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=3).Caption = "DANH MUC"
Set BAR_DM = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG")
With BAR_DM
.Controls("DANH MUC").OnAction = "SHOW_F_DM"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=2).Caption = "SO XUAT NHAP TON"
Set BAR_SCTNXT = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_SCTNXT
.Controls("SO XUAT NHAP TON").OnAction = "SHOW_F_SXNT"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=4).Caption = "SUA PHIEU"
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG"). _
Controls.Add(Type:=msoControlButton, BEFORE:=5).Caption = "XOA PHIEU"
Set BAR_SXP = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO").Controls("CHUNG TU KHO HANG")
With BAR_SXP
.Controls("XOA PHIEU").OnAction = "show_F_XPNKC"
.Controls("SUA PHIEU").OnAction = "show_F_SPNKC"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=3).Caption = "BANG KE NHAP XUAT"
Set BAR_BK1 = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_BK1
.Controls("BANG KE NHAP XUAT").OnAction = "SHOW_F_BKNX"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=4).Caption = "IN PHIEU"
Set BAR_IP = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_IP
.Controls("IN PHIEU").OnAction = "SHOW_F_MP"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=5).Caption = "THANG LAM VIEC"
Set BAR_TLV = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_TLV
.Controls("THANG LAM VIEC").OnAction = "show_F_NTLV"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=6).Caption = "TRICH LOC"
Set BAR_TL = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_TL
.Controls("TRICH LOC").OnAction = "show_F_TRICHLOC"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=7).Caption = "MAT KHAU"
Set BAR_MK = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_MK
.Controls("MAT KHAU").OnAction = "SHOW_F_PS"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=8).Caption = "DOI CHIEU"
Set BAR_DC = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO") With BAR_DC .Controls("DOI CHIEU").OnAction = "SHOW_F_DOICHIEU" End With CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _ Controls.Add(Type:=msoControlButton, BEFORE:=9).Caption = "BAO CAO LUONG" Set BAR_BCL = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_BCL
.Controls("BAO CAO LUONG").OnAction = "show_F_LUONG"
End With
CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO"). _
Controls.Add(Type:=msoControlButton, BEFORE:=10).Caption = "XNT 1 THANG"
Set BAR_XNT1T = CommandBars("WORKSHEET MENU BAR").Controls("MENU QUAN TRI KHO")
With BAR_XNT1T
.Controls("XNT 1 THANG").OnAction = "show_F_XNT"
End With
End Sub
Previous Post
Next Post

0 nhận xét: