MALICIOUS
222
Risk Score
Heuristics 11
-
VBA project inside OOXML medium 5 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
VBA downloads and writes a file to disk critical OLE_VBA_HTTP_DROP_EXECVBA reads an HTTP response body and writes it to disk (ADODB.Stream SaveToFile). Combined with the auto-exec/Shell paths this is a download-drop dropper even when the COM ProgIDs are built dynamically to evade keyword scanning.Matched line in script
stream.Write http.responseBody -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Set objSchema = CreateObject("MSXML2.XMLSchemaCache.6.0") -
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECTriggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
-
Workbook_Open macro low OLE_VBA_WBOPENWorkbook_Open macroMatched line in script
Private Sub Workbook_Open() -
Environ() call (env variable access) low OLE_VBA_ENVIRONEnviron() call (env variable access)Matched line in script
folderPath = Environ("TEMP") & "\temp_xml_import\" -
Callback phishing phone lure medium SE_CALLBACK_LUREDocument asks the user to call a phone number in billing, refund, subscription, fraud, or security context — consistent with callback phishing or tech-support scam patterns. Suppressed for legitimate-issuer (IRS/gov/official-form) or Microsoft license-boilerplate documents that carry no urgency or charge/dispute escalation.
-
External hyperlinks (1) low OOXML_EXTERNAL_HYPERLINKSDocument contains 1 external hyperlink — clickable URLs are stored as external relationships. First target: https://e-mikrofirma.mf.gov.pl/jpk-client
-
Hidden worksheet (hidden, veryHidden) low OOXML_HIDDEN_SHEETExcel workbook contains 4 hidden sheet(s) — hidden sheets are commonly used to conceal macro code, staging data, or intermediate payload construction
-
Fake invoice / payment lure low SE_INVOICE_LUREDocument contains invoice or payment language paired with an action verb — useful context when combined with link, macro, or attachment indicators
-
Embedded URL info EMBEDDED_URLOne or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.URL https://e-mikrofirma.mf.gov.pl/jpk-client Referenced by macro
- https://www.iform.pl/txtfile/jpk/broszury/broszura-klient-jpk_web.pdfReferenced by macro
- https://www.iform.pl/content/39-jak-wlaczyc-makra-w-exceluReferenced by macro
- https://www.podatki.gov.pl/media/6342/podręcznik-użytkownika-klient-jpk_web.pdfReferenced by macro
- http://www.iform.pl/txtfile/jpk/broszury/broszura_jpk_vat7m.pdfReferenced by macro
- https://www.iform.pl/content/38-instrukcja-techniczna-jpk-excelReferenced by macro
- http://www.iform.plReferenced by macro
- http://crd.gov.pl/wzor/2025/12/19/14089/Referenced by macro
- http://pit.waw.pl/xsd/jpkv7k14089schemat.xsdReferenced by macro
- http://iform.pl/txtfile/licencje/Referenced by macro
- http://crd.gov.pl/xml/schematy/dziedzinowe/mf/2022/09/13/eD/DefinicjeTypy/Referenced by macro
- http://iform.pl/txtfile/jpk/Referenced by macro
- http://crd.gov.pl/wzor/2025/12/19/14089/�Referenced by macro
- http://www.w3.org/2001/XMLSchemaReferenced by macro
Extracted artifacts 32
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) | 260837 bytes |
SHA-256: d56c6c2037bcc7e70e3460554f459d5ef2649fb2155734e7e8b54e97481afe72 |
|||
Preview scriptFirst 1,000 lines of the extracted script
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
Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveWorkbook.Colors(19) = RGB(255, 255, 255)
End Sub
Private Sub Workbook_Open()
DataSystemFormat
Application.CellDragAndDrop = False
End Sub
Private Sub Workbook_Activate()
Application.OnKey "~", "goEnter"
Application.OnKey "{Enter}", "goEnter"
Application.OnKey "{Esc}", "goEsc"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CellDragAndDrop = True
Application.OnKey "~"
Application.OnKey "{Enter}"
Application.OnKey "{Esc}"
On Error Resume Next
Application.ScreenUpdating = False
Windows("_Info").WindowState = xlMinimized
Windows("_Firmy").WindowState = xlMinimized
Workbooks("_Info.xls").Close SaveChanges:=True
Workbooks("_Firmy.xls").Close SaveChanges:=True
End Sub
Attribute VB_Name = "VAT7K"
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_Control = "CommandButton5, 347, 3, MSForms, CommandButton"
Attribute VB_Control = "ixx3, 204, 4, MSForms, Image"
Attribute VB_Control = "ixx1, 202, 5, MSForms, Image"
Attribute VB_Control = "ikk14, 230, 6, MSForms, Image"
Attribute VB_Control = "ikk13, 229, 7, MSForms, Image"
Attribute VB_Control = "ikk12, 228, 8, MSForms, Image"
Attribute VB_Control = "ikk11, 227, 9, MSForms, Image"
Attribute VB_Control = "ikk10, 226, 10, MSForms, Image"
Attribute VB_Control = "ikk9, 225, 11, MSForms, Image"
Attribute VB_Control = "ikk8, 224, 12, MSForms, Image"
Attribute VB_Control = "ikk6, 222, 13, MSForms, Image"
Attribute VB_Control = "ikk5, 221, 14, MSForms, Image"
Attribute VB_Control = "ikk4, 220, 15, MSForms, Image"
Attribute VB_Control = "ikk2, 218, 16, MSForms, Image"
Attribute VB_Control = "ixx14, 215, 17, MSForms, Image"
Attribute VB_Control = "ixx13, 214, 18, MSForms, Image"
Attribute VB_Control = "ixx12, 213, 19, MSForms, Image"
Attribute VB_Control = "ixx11, 212, 20, MSForms, Image"
Attribute VB_Control = "ixx10, 211, 21, MSForms, Image"
Attribute VB_Control = "ixx9, 210, 22, MSForms, Image"
Attribute VB_Control = "ixx8, 209, 23, MSForms, Image"
Attribute VB_Control = "ixx6, 207, 24, MSForms, Image"
Attribute VB_Control = "ixx5, 206, 25, MSForms, Image"
Attribute VB_Control = "ixx4, 205, 26, MSForms, Image"
Attribute VB_Control = "ixx2, 203, 27, MSForms, Image"
Attribute VB_Control = "CommandButton3, 71, 28, MSForms, CommandButton"
Attribute VB_Control = "CommandButton1, 70, 29, MSForms, CommandButton"
Attribute VB_Control = "CommandButton4, 30, 30, MSForms, CommandButton"
Attribute VB_Control = "CommandButton2, 29, 31, MSForms, CommandButton"
Attribute VB_Control = "ikk1, 217, 32, MSForms, Image"
Attribute VB_Control = "ikk3, 219, 33, MSForms, Image"
Attribute VB_Control = "ixx15, 350, 34, MSForms, Image"
Attribute VB_Control = "ixx16, 351, 35, MSForms, Image"
Attribute VB_Control = "ikk15, 352, 36, MSForms, Image"
Attribute VB_Control = "ikk16, 353, 37, MSForms, Image"
Attribute VB_Control = "ikk17, 354, 38, MSForms, Image"
Attribute VB_Control = "ixx17, 355, 39, MSForms, Image"
Private Sub CommandButton1_Click()
VATJPK = 3
KorektaPodstawy xlOn
If [AG1] = 1 Then
ZapiszXML.Show
If JPKVAT = 1 Then
Walid
Walida3
Else
Walida3
End If
Else
KorektaXML.Show
If JPKVAT = 1 Then
Walid
Walida3
End If
If JPKVAT = 2 Then Walid
If JPKVAT = 3 Then Walida3
End If
NRPL:
Nplik = ThisWorkbook.Path & "\JPK_VAT_" & Range("P11") & "-" & Range("U11") & ".xml"
Wer = Application.GetSaveAsFilename(InitialFileName:=Nplik, FileFilter:="Pliki xml (*.xml), *.xml", Title:="Zapisz jako")
If Wer = False Then Exit Sub
Nplik = Wer
Dim Npli As String
Npli = Right(Nplik, Len(Nplik) - InStrRev(Nplik, "\"))
Nplik = Left(Nplik, Len(Nplik) - Len(Npli))
Npli2 = Npli
If Npli2 <> ZamZnaki(Npli) Then
MsgBox "Entered file name: " & Npli2 & vbCrLf & _
"contained characters not allowed for a JPK file name." & vbCrLf & _
"File name after correction: " & ZamZnaki(Npli), vbCritical, ""
End If
Nplik = Nplik & ZamZnaki(Npli)
If Dir(Nplik) <> "" Then
Zap = MsgBox("File " & Dir(Nplik) & " already exists." & vbCrLf & _
"Do you want to replace it?", 36, "Save As confirmation")
If Zap = 7 Then GoTo NRPL
End If
Zar = False
Zas = False
VATnext = False
Sheets("VAT-7K").Select
Doxml
Application.EnableEvents = True
VAT7K.Select
If [AG1] = 2 Then
If JPKVAT = 1 Or JPKVAT = 2 Then
'Doniesie.Visible = True
'Doniesie.Activate
'Dzis xlOn
End If
End If
End Sub
Private Sub CommandButton2_Click()
Imfreshvat xlOn
ActiveWorkbook.Colors(19) = RGB(255, 255, 255)
Wydruk.Show
End Sub
Private Sub CommandButton3_Click()
ImportXMLa
ikk1.Visible = True
ixx1.Visible = True
Imfreshvat xlOn
End Sub
Private Sub CommandButton4_Click()
If ActiveWorkbook.Colors(15) = RGB(234, 234, 234) Then
ActiveWorkbook.Colors(15) = RGB(255, 255, 255)
ActiveWorkbook.Colors(16) = RGB(255, 255, 255)
CommandButton4.Caption = "Włącz tło"
Else
ActiveWorkbook.Colors(15) = RGB(234, 234, 234)
ActiveWorkbook.Colors(16) = RGB(191, 191, 191)
CommandButton4.Caption = "Wyłącz tło"
End If
End Sub
Private Sub CommandButton5_Click()
Usundane
ikk1.Visible = True
ixx1.Visible = True
Imfreshvat xlOn
End Sub
Private Sub Worksheet_Activate()
Application.CellDragAndDrop = False
Imfreshvat xlOn
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NIP As String
Application.CellDragAndDrop = False
If Target.Row = 7 Then
NIP = Range("C7")
Application.EnableEvents = False
If Len(NIP) = 10 Then
If CzyNIP(NIP) = False Then
MsgBox "Invalid payer NIP", 16, ""
Range("C7") = ""
Application.EnableEvents = True
End
End If
End If
Application.EnableEvents = True
If Sheets("A").Cells(9, 9) = "" Then
Sheets("A").Cells(9, 9) = NIP
ThisWorkbook.Save
Else
If Sheets("A").Cells(9, 9) <> Range("C7") Then
MsgBox "The program license has been registered for the Payer" & Chr(13) & _
"with VAT ID (NIP) number " & Sheets("A").Cells(9, 9), vbInformation, "JPK_V7K License for 1 taxpayer"
Range("C7") = Sheets("A").Cells(9, 9)
End
End If
End If
End If
If Target.Row = 166 And Target.Column = 4 Then
ActiveSheet.Unprotect
Application.ScreenUpdating = False
Selection.Hyperlinks.Delete
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 1
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("D166:U166").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("D166").Select
ActiveSheet.Protect
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveWorkbook.Colors(19) = RGB(255, 255, 255) Then
ActiveWorkbook.Colors(19) = RGB(255, 255, 150)
End If
If [E18] = "" And Target.Row = 18 Then Fraza.Show
If Sheets("A").Cells(9, 9) = "" And Range("C7") <> "" Then
Sheets("A").Cells(9, 9) = Range("C7")
ThisWorkbook.Save
Else
If Sheets("A").Cells(9, 9) <> Range("C7") Then
MsgBox "The program license has been registered for the Payer" & Chr(13) & _
"with NIP number " & Sheets("A").Cells(9, 9), vbInformation, "JPK_V7K License for 1 taxpayer"
Range("C7") = Sheets("A").Cells(9, 9)
End
End If
End If
End Sub
Private Sub ikk1_Click()
ikk1.Visible = False
ixx1.Visible = True
ixx2.Visible = False
ikk2.Visible = True
[AG1] = 1
ORDZU.Visible = False
Doniesie.Visible = False
End Sub
Private Sub ikk2_Click()
ikk2.Visible = False
ixx2.Visible = True
ixx1.Visible = False
ikk1.Visible = True
[AG1] = 2
ORDZU.Visible = True
ORDZU.Activate
End Sub
Private Sub ikk3_Click()
Application.ScreenUpdating = False
ikk3.Visible = False
ixx3.Visible = True
ixx4.Visible = False
ikk4.Visible = True
[AG2] = 1
Sheets("JPK").Select
ActiveSheet.Unprotect
ActiveSheet.Shapes.Range(Array("ikk3")).Select
ActiveSheet.Shapes("ikk3").ZOrder msoSendToBack
ActiveSheet.Shapes.Range(Array("ixx3")).Select
ActiveSheet.Shapes("ixx3").ZOrder msoBringToFront
ActiveSheet.Shapes.Range(Array("ixx4")).Select
ActiveSheet.Shapes("ixx4").ZOrder msoSendToBack
ActiveSheet.Shapes.Range(Array("ikk4")).Select
ActiveSheet.Shapes("ikk4").ZOrder msoBringToFront
ActiveSheet.Protect
ActiveCell.Select
Sheets("VAT-7K").Select
End Sub
Private Sub ikk4_Click()
Application.ScreenUpdating = False
ikk4.Visible = False
ixx4.Visible = True
ixx3.Visible = False
ikk3.Visible = True
[AG2] = 2
Sheets("JPK").Select
ActiveSheet.Unprotect
ActiveSheet.Shapes.Range(Array("ikk4")).Select
ActiveSheet.Shapes("ikk4").ZOrder msoSendToBack
ActiveSheet.Shapes.Range(Array("ixx4")).Select
ActiveSheet.Shapes("ixx4").ZOrder msoBringToFront
ActiveSheet.Shapes.Range(Array("ixx3")).Select
ActiveSheet.Shapes("ixx3").ZOrder msoSendToBack
ActiveSheet.Shapes.Range(Array("ikk3")).Select
ActiveSheet.Shapes("ikk3").ZOrder msoBringToFront
ActiveSheet.Protect
ActiveCell.Select
Sheets("VAT-7K").Select
End Sub
Private Sub ixx5_Click()
ixx5.Visible = False
ikk5.Visible = True
[AG3] = 0
End Sub
Private Sub ikk5_Click()
If [Z123] = 0 Then
MsgBox "No refund amount in item 54", vbInformation, ""
[Z123].Select
End
End If
ikk5.Visible = False
ixx5.Visible = True
ixx6.Visible = False
ikk6.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx8.Visible = False
ikk8.Visible = True
ixx15.Visible = False
ikk15.Visible = True
ixx16.Visible = False
ikk16.Visible = True
[AG3] = 1
[AG4] = 0
[AG5] = 0
[AG6] = 0
[AG13] = 0
[AG14] = 0
End Sub
Private Sub ixx6_Click()
ixx6.Visible = False
ikk6.Visible = True
[AG4] = 0
End Sub
Private Sub ikk6_Click()
If [Z123] = 0 Then
MsgBox "No refund amount in item 54", vbInformation, ""
[Z123].Select
End
End If
ikk6.Visible = False
ixx6.Visible = True
ixx5.Visible = False
ikk5.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx8.Visible = False
ikk8.Visible = True
ixx15.Visible = False
ikk15.Visible = True
ixx16.Visible = False
ikk16.Visible = True
[AG4] = 1
[AG3] = 0
[AG5] = 0
[AG6] = 0
[AG13] = 0
[AG14] = 0
End Sub
'Private Sub ixx7_Click()
'ixx7.Visible = False
'ikk7.Visible = True
'[AG5] = 0
'End Sub
'Private Sub ikk7_Click()
'If [Z123] = 0 Then
'MsgBox "Brak kwoty do zwrotu w poz.54", vbInformation, ""
'[Z123].Select
'End
'End If
'ikk7.Visible = False
'ixx7.Visible = True
'ixx5.Visible = False
'ikk5.Visible = True
'ixx6.Visible = False
'ikk6.Visible = True
'ixx8.Visible = False
'ikk8.Visible = True
'ixx15.Visible = False
'ikk15.Visible = True
'ixx16.Visible = False
'ikk16.Visible = True
'[AG5] = 1
'[AG4] = 0
'[AG3] = 0
'[AG6] = 0
'[AG13] = 0
'[AG14] = 0
'End Sub
Private Sub ixx8_Click()
ixx8.Visible = False
ikk8.Visible = True
[AG6] = 0
End Sub
Private Sub ikk8_Click()
If [Z123] = 0 Then
MsgBox "No refund amount in item 54", vbInformation, ""
[Z123].Select
End
End If
ikk8.Visible = False
ixx8.Visible = True
ixx5.Visible = False
ikk5.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx6.Visible = False
ikk6.Visible = True
ixx15.Visible = False
ikk15.Visible = True
ixx16.Visible = False
ikk16.Visible = True
[AG6] = 1
[AG4] = 0
[AG5] = 0
[AG3] = 0
[AG13] = 0
[AG14] = 0
End Sub
Private Sub ixx15_Click()
ixx15.Visible = False
ikk15.Visible = True
[AG13] = 0
End Sub
Private Sub ikk15_Click()
If [Z123] = 0 Then
MsgBox "No refund amount in item 54", vbInformation, ""
[Z123].Select
End
End If
ikk15.Visible = False
ixx15.Visible = True
ixx5.Visible = False
ikk5.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx6.Visible = False
ikk6.Visible = True
ixx8.Visible = False
ikk8.Visible = True
ixx16.Visible = False
ikk16.Visible = True
[AG6] = 0
[AG4] = 0
[AG5] = 0
[AG3] = 0
[AG13] = 1
[AG14] = 0
End Sub
Private Sub ixx16_Click()
ixx16.Visible = False
ikk16.Visible = True
[AG14] = 0
End Sub
Private Sub ikk16_Click()
If [Z123] = 0 Then
MsgBox "No refund amount in item 54", vbInformation, ""
[Z121].Select
End
End If
ikk16.Visible = False
ixx16.Visible = True
ixx5.Visible = False
ikk5.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx6.Visible = False
ikk6.Visible = True
ixx8.Visible = False
ikk8.Visible = True
ixx15.Visible = False
ikk15.Visible = True
[AG6] = 0
[AG4] = 0
[AG5] = 0
[AG3] = 0
[AG13] = 0
[AG14] = 1
End Sub
Private Sub ixx9_Click()
ixx9.Visible = False
ikk9.Visible = True
[AG7] = 0
End Sub
Private Sub ikk9_Click()
ikk9.Visible = False
ixx9.Visible = True
[AG7] = 1
End Sub
Private Sub ixx10_Click()
ixx10.Visible = False
ikk10.Visible = True
[AG8] = 0
End Sub
Private Sub ikk10_Click()
ikk10.Visible = False
ixx10.Visible = True
[AG8] = 1
End Sub
Private Sub ixx11_Click()
ixx11.Visible = False
ikk11.Visible = True
[AG9] = 0
End Sub
Private Sub ikk11_Click()
ikk11.Visible = False
ixx11.Visible = True
[AG9] = 1
End Sub
Private Sub ixx12_Click()
ixx12.Visible = False
ikk12.Visible = True
[AG10] = 0
End Sub
Private Sub ikk12_Click()
ikk12.Visible = False
ixx12.Visible = True
[AG10] = 1
End Sub
Private Sub ixx13_Click()
ixx13.Visible = False
ikk13.Visible = True
[AG11] = 0
End Sub
Private Sub ikk13_Click()
ikk13.Visible = False
ixx13.Visible = True
[AG11] = 1
End Sub
Private Sub ixx14_Click()
ixx14.Visible = False
ikk14.Visible = True
[AG12] = 0
End Sub
Private Sub ikk14_Click()
ikk14.Visible = False
ixx14.Visible = True
[AG12] = 1
End Sub
Private Sub ixx17_Click()
ixx17.Visible = False
ikk17.Visible = True
[AG15] = 0
End Sub
Private Sub ikk17_Click()
ikk17.Visible = False
ixx17.Visible = True
[AG15] = 1
End Sub
Sub Imfreshvat(st)
'If ikk1.Visible = True And ixx1.Visible = True Then
Application.ScreenUpdating = False
If [AG1] = 1 Then
ikk1.Visible = False
ixx1.Visible = True
ixx2.Visible = False
ikk2.Visible = True
End If
If [AG1] = 2 Then
ikk2.Visible = False
ixx2.Visible = True
ixx1.Visible = False
ikk1.Visible = True
End If
If [AG2] = 0 Then
ikk3.Visible = True
ixx3.Visible = False
ixx4.Visible = False
ikk4.Visible = True
End If
If [AG2] = 1 Then
ikk3.Visible = False
ixx3.Visible = True
ixx4.Visible = False
ikk4.Visible = True
End If
If [AG2] = 2 Then
ikk4.Visible = False
ixx4.Visible = True
ixx3.Visible = False
ikk3.Visible = True
End If
If [AG3] = 0 Then
ikk5.Visible = True
ixx5.Visible = False
End If
If [AG3] = 1 Then
ikk5.Visible = False
ixx5.Visible = True
ixx6.Visible = False
ikk6.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx8.Visible = False
ikk8.Visible = True
End If
If [AG4] = 0 Then
ikk6.Visible = True
ixx6.Visible = False
End If
If [AG4] = 1 Then
ikk6.Visible = False
ixx6.Visible = True
ixx5.Visible = False
ikk5.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx8.Visible = False
ikk8.Visible = True
End If
'If [AG5] = 0 Then
'ikk7.Visible = True
'ixx7.Visible = False
'End If
If [AG5] = 1 Then
'ikk7.Visible = False
'ixx7.Visible = True
ixx5.Visible = False
ikk5.Visible = True
ixx6.Visible = False
ikk6.Visible = True
ixx8.Visible = False
ikk8.Visible = True
End If
If [AG6] = 0 Then
ikk8.Visible = True
ixx8.Visible = False
End If
If [AG6] = 1 Then
ikk8.Visible = False
ixx8.Visible = True
ixx5.Visible = False
ikk5.Visible = True
'ixx7.Visible = False
'ikk7.Visible = True
ixx6.Visible = False
ikk6.Visible = True
End If
If [AG7] = 0 Then
ikk9.Visible = True
ixx9.Visible = False
End If
If [AG7] = 1 Then
ikk9.Visible = False
ixx9.Visible = True
End If
If [AG8] = 0 Then
ikk10.Visible = True
ixx10.Visible = False
End If
If [AG8] = 1 Then
ikk10.Visible = False
ixx10.Visible = True
End If
If [AG9] = 0 Then
ikk11.Visible = True
ixx11.Visible = False
End If
If [AG9] = 1 Then
ikk11.Visible = False
ixx11.Visible = True
End If
If [AG10] = 0 Then
ikk12.Visible = True
ixx12.Visible = False
End If
If [AG10] = 1 Then
ikk12.Visible = False
ixx12.Visible = True
End If
If [AG11] = 0 Then
ikk13.Visible = True
ixx13.Visible = False
End If
If [AG11] = 1 Then
ikk13.Visible = False
ixx13.Visible = True
End If
If [AG12] = 0 Then
ikk14.Visible = True
ixx14.Visible = False
End If
If [AG12] = 1 Then
ikk14.Visible = False
ixx14.Visible = True
End If
If [AG13] = 0 Then
ikk15.Visible = True
ixx15.Visible = False
End If
If [AG13] = 1 Then
ikk15.Visible = False
ixx15.Visible = True
End If
If [AG14] = 0 Then
ikk16.Visible = True
ixx16.Visible = False
End If
If [AG14] = 1 Then
ikk16.Visible = False
ixx16.Visible = True
End If
If [AG15] = 0 Then
ikk17.Visible = True
ixx17.Visible = False
End If
If [AG15] = 1 Then
ikk17.Visible = False
ixx17.Visible = True
End If
'End If
End Sub
Attribute VB_Name = "AA"
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 = "Walidacj"
Option Private Module
Public sh As Integer
Public sk As Integer
Public sd As Integer
Public Zar As Boolean
Public Zas As Boolean
Public SEP As String
Public VATsign, VATnext
Public VatNalStop As Boolean
Dim b As Long
Sub Walid()
VAT7K.Select
Wal "c7"
Wal "p11"
Wal "u11"
Wal "e18"
Wal "e27"
If [AG2] = 2 Then
Wal "e28"
If [E29] > 73415 Then GoTo Blad
Wal "e29"
Blad:
If Not IsDate([E29]) Or ([E29]) < #1/1/1925# Or ([E29]) > #12/31/2100# Then
MsgBox "Enter date as dd-mm-yyyy", 16, "Invalid date"
[E29].Select
Selection.ClearContents
'ActiveSheet.Unprotect
Selection.NumberFormat = "m/d/yyyy"
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
End With
With Selection.Validation
.Delete
.Add Type:=xlValidateDate, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="1/1/1925", Formula2:="12/31/2100"
.InputTitle = "Date of Birth"
.ErrorTitle = "Error"
.InputMessage = "Enter date as 8 digits. E.g., 01-02-2000"
.ErrorMessage = "Invalid date. Please enter the date as 8 digits, e.g., 01-02-2014"
.ShowInput = True
.ShowError = True
End With
End
End If
End If
If [AG2] = 0 Then
MsgBox "Check the box in position 8", 16, "Warning"
[E24].Select
End
End If
If [AG2] = 0 Then
MsgBox "Check the box in item 8", 16, "Warning"
[E24].Select
End
End If
If [AG7] = 1 Then
Wal "u131"
Wal "i133"
End If
If [AG7] = 0 And [U131] > 0 Then
MsgBox "Check the box in item 59", 16, "Warning"
[U128].Select
End
End If
If [AG3] <> 0 Then Wal "z123"
If [Z123] > 0 Then
If [AG3] + [AG4] + [AG5] + [AG6] + [AG13] + [AG14] = 0 Then
MsgBox "Check the boxes in items 55 to 58", 16, "Warning"
[R123].Select
End
End If
End If
Wal "d164"
Wal "n164"
Wal "d166"
End Sub
Sub Walid2()
VAT7K.Select
Wal "c7"
Wal "p11"
Wal "u11"
Wal "e18"
Wal "e27"
If [AG2] = 2 Then
Wal "e28"
Wal "e29"
End If
If [AG2] = 0 Then
MsgBox "Check the box in item 8", 16, "Warning"
[E24].Select
End
End If
If [AG7] = 1 Then
Wal "u131"
Wal "i133"
End If
Wal "d164"
Wal "n164"
Wal "d166"
End Sub
Sub Walida3()
Application.ScreenUpdating = False
sh = 69
sk = 41
sd = 6
Sprzedaz3.Select
Walidacja
sh = 22
sk = 14
sd = 6
Zakup3.Select
Walidacja
VAT7K.Select
End Sub
Sub Walida4()
Application.ScreenUpdating = False
sh = 69
sk = 41
sd = 6
If JPK1.[AA1] = 1 Then
Sprzedaz1.Select
Walidacja
Else
Sprzedaz2.Select
Walidacja
End If
sh = 22
sk = 14
sd = 6
If JPK1.[AA1] = 1 Then
Zakup1.Select
Walidacja
Else
Zakup2.Select
Walidacja
End If
JPK1.Select
End Sub
Function Wal(Adr) 'Wal ""
If Range(Adr) = "" Then
Application.EnableEvents = False
Range(Adr).Select
W = Selection.Row
c = Selection.Column
Application.GoTo Cells(W - 5, 1), True
Cells(W, c).Select
Application.EnableEvents = True
MsgBox "Please fill in the field " & Cells(W - 1, c), 16, "Warning"
End
End If
End Function
Sub Walidacja()
Dim a As Long
Dim myDat As String
Dim rngCell As Range
Dim Ro As Integer
Dim Za As Integer
Dim DA As Integer
Dim Dar As Integer
Dim Mo As Integer
Dim rol As Integer
Dim Jo, Jd, JVK
Dim ror As Integer
Dim Ldec As Boolean
Dim Zap As Integer
…
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: xl/vbaProject.bin | 552448 bytes |
SHA-256: 23a548ead37a538c5c2089b9f0be8d6183f7250389719684beb9b2a43d6c174f |
|||
emf_00.emf |
ooxml-emf | OOXML EMF part: xl/media/image36.emf | 2724 bytes |
SHA-256: 282c24ccbca29cb73460de43541c718f05529a44d802728bad322614f1f79f98 |
|||
emf_01.emf |
ooxml-emf | OOXML EMF part: xl/media/image20.emf | 1168 bytes |
SHA-256: 5207bc53f3e3222db1ecca98baacb97620c37bcbf3f35a6bda1dfd41b6e5b18c |
|||
emf_02.emf |
ooxml-emf | OOXML EMF part: xl/media/image32.emf | 2672 bytes |
SHA-256: 234c323388f906146dbc926839d33d03adbb2f35da54fc30ecdee4a151a58e19 |
|||
emf_03.emf |
ooxml-emf | OOXML EMF part: xl/media/image26.emf | 2724 bytes |
SHA-256: 6a285360736472fed7bc47f68c78b2a49eb527c1416acb4c99ce4ed47273dfbd |
|||
emf_04.emf |
ooxml-emf | OOXML EMF part: xl/media/image40.emf | 2708 bytes |
SHA-256: 4c377ec38ee72d50043519cddb10cc7cfbe87b2e59a3752fea8b7b9b8847ddf6 |
|||
emf_05.emf |
ooxml-emf | OOXML EMF part: xl/media/image21.emf | 1168 bytes |
SHA-256: 228984af52f32e987cce3921cf9e88e7f27bbe0ca322b7fb11a5ba0209f5e6d9 |
|||
emf_06.emf |
ooxml-emf | OOXML EMF part: xl/media/image37.emf | 2996 bytes |
SHA-256: 3bcbdeb1f46cb2d381449799efa1cc04ff961952883d0c40b91e187f8d8a2f38 |
|||
emf_07.emf |
ooxml-emf | OOXML EMF part: xl/media/image22.emf | 2672 bytes |
SHA-256: 778835f97df2e24505ff20058c084a7fc90fa07038ef9365904fb0a2d047b0ac |
|||
emf_08.emf |
ooxml-emf | OOXML EMF part: xl/media/image23.emf | 2816 bytes |
SHA-256: 6145aa723ace459f6257c1944651f4c1c57f2ebb73b74b7fef6065810c81220f |
|||
emf_09.emf |
ooxml-emf | OOXML EMF part: xl/media/image38.emf | 2676 bytes |
SHA-256: 12f3d108f5c1f591f7b379438418398c34b90a91cea7f6628b5f0352aa959937 |
|||
emf_10.emf |
ooxml-emf | OOXML EMF part: xl/media/image27.emf | 1168 bytes |
SHA-256: 1d2dff50b921565010645d36ec5693d20700f26344ae5ba1fe2e5e27c692c187 |
|||
emf_11.emf |
ooxml-emf | OOXML EMF part: xl/media/image34.emf | 2712 bytes |
SHA-256: 0bc67b8a54a2f9487e0c7cb871922eb043d6fb61d3209773244e7102696ffb02 |
|||
emf_12.emf |
ooxml-emf | OOXML EMF part: xl/media/image28.emf | 1168 bytes |
SHA-256: 3cdc87442c50282036ba7627c7ca85e7dddf407f0ace4264a9aa477efd6353d7 |
|||
emf_13.emf |
ooxml-emf | OOXML EMF part: xl/media/image24.emf | 1168 bytes |
SHA-256: 96fc2823b01030c96dd160a71663d9aedd3d855c399e5ff8c7ff926484d8182f |
|||
emf_14.emf |
ooxml-emf | OOXML EMF part: xl/media/image29.emf | 2760 bytes |
SHA-256: 8550b4f90bccf3eb499ee5d51bb033ef64051fddcde4c6a9e101107e94cb3443 |
|||
emf_15.emf |
ooxml-emf | OOXML EMF part: xl/media/image41.emf | 2724 bytes |
SHA-256: 14c905e4cba0b684672ef0f683f6a7a2ff0750d8142da554fc1550c5cc252d48 |
|||
emf_16.emf |
ooxml-emf | OOXML EMF part: xl/media/image42.emf | 2708 bytes |
SHA-256: 301d166826f597d367ef6a053a3bbd2fc75f5ae762b27c48d29895f7e34b309f |
|||
emf_17.emf |
ooxml-emf | OOXML EMF part: xl/media/image30.emf | 2816 bytes |
SHA-256: ab03e3470a3035602d1ab9968bf571679e510287dc1af8ddd411e20a9a8f8405 |
|||
emf_18.emf |
ooxml-emf | OOXML EMF part: xl/media/image25.emf | 1168 bytes |
SHA-256: 371969daec57711d1f68b999b330255fb0b285daf6b6e46d5d7c84cdf353692c |
|||
emf_19.emf |
ooxml-emf | OOXML EMF part: xl/media/image35.emf | 2712 bytes |
SHA-256: d91b1b722420c4b8717902d886990633e899bc698dbf318a5be37a499afb1a19 |
|||
emf_20.emf |
ooxml-emf | OOXML EMF part: xl/media/image39.emf | 2840 bytes |
SHA-256: 288f7698d386947f206f4355f6d5490e1c4e7ea8cbca27c958ccbae94ddb78ec |
|||
emf_21.emf |
ooxml-emf | OOXML EMF part: xl/media/image31.emf | 2768 bytes |
SHA-256: 2625e1fcf9fe358cc545c702bb02e580ffdf5e02ee51142048ca43de27905bd5 |
|||
emf_22.emf |
ooxml-emf | OOXML EMF part: xl/media/image43.emf | 2708 bytes |
SHA-256: 8f8519235e6e617cfc5a6a71373ac5b54fe7bb5269fbbe3b54d396493e446cb6 |
|||
emf_23.emf |
ooxml-emf | OOXML EMF part: xl/media/image44.emf | 2724 bytes |
SHA-256: 7518c7069fee18e2b3d38f65a48422ed4e0f4f9face6df4ce023fedf0d9e46ef |
|||
emf_24.emf |
ooxml-emf | OOXML EMF part: xl/media/image45.emf | 2724 bytes |
SHA-256: 2ea0e2643c45d3065e24d5b84bbf5890ebadd1276a5faf8aeb0bccc8f6331096 |
|||
emf_25.emf |
ooxml-emf | OOXML EMF part: xl/media/image46.emf | 2708 bytes |
SHA-256: 7d331dbb6c2cd4e09228bf71b6b8f97310c785fdd2874e377a666203026c6316 |
|||
emf_26.emf |
ooxml-emf | OOXML EMF part: xl/media/image47.emf | 2724 bytes |
SHA-256: 1dbb5ae55cdfe7e9c3950d296c6024831d2995011a6bb81d0719af87d26fc5a9 |
|||
emf_27.emf |
ooxml-emf | OOXML EMF part: xl/media/image48.emf | 2708 bytes |
SHA-256: 0178d7bd84058160d9544aa08290b79485903d50194eb9a2838eaddcc401d782 |
|||
emf_28.emf |
ooxml-emf | OOXML EMF part: xl/media/image49.emf | 2724 bytes |
SHA-256: 14f1f46731aaece64b3996821cfd98889d525b55b7df1e442f000adb6a5c168e |
|||
emf_29.emf |
ooxml-emf | OOXML EMF part: xl/media/image50.emf | 2724 bytes |
SHA-256: 4b7ed2758e4eb78cb5571128304f0301cb82ad2dd8cc2a853312e4be5764a5f8 |
|||
Open this report in the interactive analyzer, or submit your own file for analysis.