MALICIOUS
238
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1105 Ingress Tool Transfer
The file is an Excel spreadsheet containing VBA macros. Critical heuristics indicate the presence of URLDownloadToFile and a download primitive, suggesting the macro is designed to download and execute a second-stage payload. The Auto_Open macro and CreateObject/GetObject calls further support this malicious intent. No specific family could be identified.
Heuristics 8
-
VBA project inside OOXML medium 5 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
URLDownloadToFile in VBA critical OLE_VBA_DOWNLOADURLDownloadToFile in VBAMatched line in script
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _ -
VBA stages a PowerShell/LOLBin download-and-run command critical OLE_VBA_BITSTRANSFER_DROPPERThe macro assembles a download command using a PowerShell or LOLBin download primitive (Start-BitsTransfer, Invoke-WebRequest, Net.WebClient, bitsadmin, certutil, ...) that fetches a remote payload, then executes it -- writing it to a script file and running it, or launching it directly from an auto-exec handler. The keywords are commonly split with PowerShell backtick / cmd caret escapes to evade scanners; this detection de-escapes the source first. A high-confidence downloader/dropper, stronger than the individual Shell / download keywords on their own.Matched line in script
'Private Sub Workbook_Open() -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Set oOutl = CreateObject("Outlook.Application") -
GetObject call high OLE_VBA_GETOBJGetObject callMatched line in script
Set oOutl = GetObject(, "Outlook.Application") -
Auto_Open macro low OLE_VBA_AUTOAuto_Open macroMatched line in script
Application.Run "SOLVER.Auto_open" -
External hyperlinks (1020) low OOXML_EXTERNAL_HYPERLINKSDocument contains 1020 external hyperlinks — clickable URLs are stored as external relationships. First target: http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722140TYA.CSV
-
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 http://www.sbwconsulting.com/ecam/ Referenced by macro
- http://www.sbwconsulting.com/ecam-faq/Referenced by macro
- http://wwp.greenwichmeantime.com/time-zone/usa/Referenced by macro
- http://schemas.microsoft.com/office/2006/01/customuiReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722140TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725489TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/726227TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/745940TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/702075TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/723440TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724830TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725360TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722430TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/726584TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/723013TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724463TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725524TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/727478TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/702590TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722215TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/723520TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724926TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/747187TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722487TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724058TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/726650TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/723075TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724510TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725565TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725670TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/727566TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/702725TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722267TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/723560TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725029TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/726145TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/747900TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722524TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722575TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724094TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/726798TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/724585TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725316TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725755TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/727687TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/723663TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/702986TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722598TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/725058TYA.CSVReferenced by macro
- http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/726350TYA.CSVReferenced by macro
+42 more URL(s)
Extracted artifacts 4
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) | 1394423 bytes |
SHA-256: 8919863f8c29b15eb79075f9942c40f555fedeef44204faa1531774b4ca02737 |
|||
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_Open()
' Call CreateMenu
'End Sub
'
'Private Sub Workbook_BeforeClose(Cancel As Boolean)
' Call DeleteMenu
'End Sub
Attribute VB_Name = "MetricsPerSF"
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_Change(ByVal Target As Range)
Dim WS As Worksheet
Dim pt As PivotTable
Set WS = Worksheets("ptMetricsSFDaytypeOccupancy")
On Error Resume Next
For Each pt In WS.PivotTables
If Target.Offset(0, -1).Value = "MonthYr" Then
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = _
Application.WorksheetFunction.Text(Target.Value, "mmm yyyy")
Else
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = Target.Value
End If
Next pt
On Error GoTo 0
If Application.Calculation = xlCalculationManual Then Application.Calculate
End Sub
Attribute VB_Name = "Components_tonsWCalc"
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 = "Subsystems"
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 = "SystemDiagram"
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 = "OKButton1, 163, 1, MSForms, CommandButton"
Private Sub OKButton1_Click()
' UserForm1DefineEquip.Show
Worksheets("System Diagram").Visible = xlVeryHidden
End Sub
Private Sub Worksheet_Deactivate()
Worksheets("System Diagram").Visible = xlVeryHidden
End Sub
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 = "Bldg1"
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 = "MenuSheet"
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 = "Components"
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 = "Components_kWCalc"
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 = "MetricsDaytypeOccupancy"
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_Change(ByVal Target As Range)
Dim WS As Worksheet
Dim pt As PivotTable
Set WS = Worksheets("ptMetricsDaytypeOccupancy")
On Error Resume Next
For Each pt In WS.PivotTables
If Target.Offset(0, -1).Value = "MonthYr" Then
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = _
Application.WorksheetFunction.Text(Target.Value, "mmm yyyy")
Else
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = Target.Value
End If
Next pt
On Error GoTo 0
If Application.Calculation = xlCalculationManual Then Application.Calculate
End Sub
Attribute VB_Name = "ComponentsNormalize"
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 = "Lists"
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 = "ptUpdateForCharts3"
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_PivotTableUpdate(ByVal Target As PivotTable)
Dim dblMin As Double
Dim dblMax As Double
Dim dblTimePeriodDays As Double
Dim myChartobj As ChartObject
Dim iptName As Integer
On Error GoTo ErrorHandler
iptName = 1
For Each myChartobj In ActiveSheet.ChartObjects
With myChartobj.Chart.Axes(xlCategory)
Application.ScreenUpdating = False
dblMin = Application.WorksheetFunction.Min(Range("pt" & iptName & "Field0Category"))
dblMax = Application.WorksheetFunction.Max(Range("pt" & iptName & "Field0Category"))
.MinimumScale = dblMin
.MaximumScale = dblMax
dblTimePeriodDays = dblMax - dblMin
.TickLabels.NumberFormat = "[$-409]ddd, m/d/yyyy"
.MajorUnitIsAuto = True
If dblTimePeriodDays < 370 Then
.MajorUnit = 30.42
End If
If dblTimePeriodDays < 183 Then
.MajorUnit = 14
End If
If dblTimePeriodDays < 61.01 Then
.MajorUnit = 7
End If
If dblTimePeriodDays < 21.01 Then
.MajorUnit = 3
End If
If dblTimePeriodDays < 14.01 Then
.MajorUnit = 1
End If
If dblTimePeriodDays < 4.01 Then
.TickLabels.NumberFormat = "[$-409]ddd, m/d/yy h:mm AM/PM;@"
.MajorUnit = 0.5
End If
If dblTimePeriodDays < 2.51 Then
.MajorUnit = 0.25
End If
If dblTimePeriodDays < 1.01 Then
.MajorUnit = 0.08333333333
End If
If dblTimePeriodDays < 0.1 Then
.MajorUnit = 3.4722222222222E-03
End If
If dblTimePeriodDays < 0.04 Then
.MajorUnitIsAuto = True
End If
End With
Next myChartobj
On Error GoTo 0
Application.ScreenUpdating = True
Exit Sub
ErrorHandler:
Application.ScreenUpdating = True
End Sub
Attribute VB_Name = "Sheet4"
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 = "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 = "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 = "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
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 = "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 = "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 = "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 = "MetricsOccupancyMonthYr"
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_Change(ByVal Target As Range)
Dim WS As Worksheet
Dim pt As PivotTable
Set WS = Worksheets("ptMetricsOccupancyMonthYr")
On Error Resume Next
For Each pt In WS.PivotTables
If Target.Offset(0, -1).Value = "MonthYr" Then
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = _
Application.WorksheetFunction.Text(Target.Value, "mmm yyyy")
Else
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = Target.Value
End If
Next pt
On Error GoTo 0
If Application.Calculation = xlCalculationManual Then Application.Calculate
End Sub
Attribute VB_Name = "MetricsDaytypeMonthYr"
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_Change(ByVal Target As Range)
Dim WS As Worksheet
Dim pt As PivotTable
Set WS = Worksheets("ptMetricsDaytypeMonthYr")
On Error Resume Next
For Each pt In WS.PivotTables
If Target.Offset(0, -1).Value = "MonthYr" Then
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = _
Application.WorksheetFunction.Text(Target.Value, "mmm yyyy")
Else
pt.PageFields(Target.Offset(0, -1).Value).CurrentPage = Target.Value
End If
Next pt
On Error GoTo 0
If Application.Calculation = xlCalculationManual Then Application.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
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
Attribute VB_Name = "Sheet17"
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 = "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 = "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 = "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
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 = "Sheet16"
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 = "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 = "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 = "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 = "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 = "LICENSE"
'https://www.apache.org/licenses/LICENSE-2.0
'Apache LICENSE
'Version 2.0, January 2004
'http://www.apache.org/licenses/
'TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
'1. Definitions.
'"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
'Sections 1 through 9 of this document.
'"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is
'granting the License.
'"Legal Entity" shall mean the union of the acting entity and all other entities that control, are
'controlled by, or are under common control with that entity. For the purposes of this definition,
'"control" means (i) the power, direct or indirect, to cause the direction or management of such
'entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
'outstanding shares, or (iii) beneficial ownership of such entity.
'"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this
'License.
'"Source" form shall mean the preferred form for making modifications, including but not limited to
'software source code, documentation source, and configuration files.
'"Object" form shall mean any form resulting from mechanical transformation or translation of a
'Source form, including but not limited to compiled object code, generated documentation, and
'conversions to other media types.
'"Work" shall mean the work of authorship, whether in Source or Object form, made available under
'the License, as indicated by a copyright notice that is included in or attached to the work (an example
'is provided in the Appendix below).
'"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or
'derived from) the Work and for which the editorial revisions, annotations, elaborations, or other
'modifications represent, as a whole, an original work of authorship. For the purposes of this License,
'Derivative Works shall not include works that remain separable from, or merely link (or bind by
'name) to the interfaces of, the Work and Derivative Works thereof.
'"Contribution" shall mean any work of authorship, including the original version of the Work and
'any modifications or additions to that Work or Derivative Works thereof, that is intentionally
'submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal
'Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition,
'"submitted" means any form of electronic, verbal, or written communication sent to the Licensor or
'its representatives, including but not limited to communication on electronic mailing lists, source
'code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor
'for the purpose of discussing and improving the Work, but excluding communication that is
'conspicuously marked or otherwise designated in writing by the copyright owner as "Not a
'Contribution."
'"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
'Contribution has been received by Licensor and subsequently incorporated within the Work.
'2. Grant of Copyright License. Subject to the terms and conditions of this License, each
' Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
' irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly
' perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
'3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor
' hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
' (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import,
' and otherwise transfer the Work, where such license applies only to those patent claims licensable by
' such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of
' their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute
' patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging
' that the Work or a Contribution incorporated within the Work constitutes direct or contributory
' patent infringement, then any patent licenses granted to You under this License for that Work shall
' terminate as of the date such litigation is filed.
'4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works
'thereof in any medium, with or without modifications, and in Source or Object form, provided that
'You meet the following conditions:
' 1. You must give any other recipients of the Work or Derivative Works a copy of this License;
' and
' 2. You must cause any modified files to carry prominent notices stating that You changed the
' files; and
' 3. You must retain, in the Source form of any Derivative Works that You distribute, all
' copyright, patent, trademark, and attribution notices from the Source form of the Work,
' excluding those notices that do not pertain to any part of the Derivative Works; and
' 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative
' Works that You distribute must include a readable copy of the attribution notices contained
' within such NOTICE file, excluding those notices that do not pertain to any part of the
' Derivative Works, in at least one of the following places: within a NOTICE text file
' distributed as part of the Derivative Works; within the Source form or documentation, if
' provided along with the Derivative Works; or, within a display generated by the Derivative
' Works, if and wherever such third-party notices normally appear. The contents of the
' NOTICE file are for informational purposes only and do not modify the License. You may
' add Your own attribution notices within Derivative Works that You distribute, alongside or
' as an addendum to the NOTICE text from the Work, provided that such additional
' attribution notices cannot be construed as modifying the License.
'
' You may add Your own copyright statement to Your modifications and may provide
' additional or different license terms and conditions for use, reproduction, or distribution of
' Your modifications, or for any such Derivative Works as a whole, provided Your use,
' reproduction, and distribution of the Work otherwise complies with the conditions stated in
' this License.
'
'5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution
'intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms
'and conditions of this License, without any additional terms or conditions. Notwithstanding the
'above, nothing herein shall supersede or modify the terms of any separate license agreement you
'may have executed with Licensor regarding such Contributions.
'6. Trademarks. This License does not grant permission to use the trade names, trademarks,
'service marks, or product names of the Licensor, except as required for reasonable and customary
'use in describing the origin of the Work and reproducing the content of the NOTICE file.
'7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor
'provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
'without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
'MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for
'determining the appropriateness of using or redistributing the Work and assume any risks associated
'with Your exercise of permissions under this License.
'8. Limitation of Liability. In no event and under no legal theory, whether in tort (including
'negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly
'negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including
'any direct, indirect, special, incidental, or consequential damages of any character arising as a result
'of this License or out of the use or inability to use the Work (including but not limited to damages for
'loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
'damages or losses), even if such Contributor has been advised of the possibility of such damages.
'
'9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative
'Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty,
'indemnity, or other liability obligations and/or rights consistent with this License. However, in
'accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not
'on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each
'Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by
'reason of your accepting any such warranty or additional liability.
'END OF TERMS AND CONDITIONS
Attribute VB_Name = "UserFormHiLiteDays"
Attribute VB_Base = "0{DC854251-B5DF-402F-833F-B196C8813364}{BB531468-4046-4923-9887-0495D3A62A06}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Option Explicit
Private Sub OKbutton_Click()
If IsNumeric(TextBox1.Value) Then
iDaysToHiLite = Int(TextBox1.Value)
Call DaysToHiLite
Else
MsgBox "That is not a valid input for the number of days to highlight. Please enter an integer number of days.", , "Invalid Data"
End If
End Sub
Private Sub CancelButton_Click()
gbCancel = True
Unload Me
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
If Not NameExists("iDaysToHiLite") Then iDaysToHiLite = 14
' Call DaysToHiLite
End If
End Sub
Private Sub DaysToHiLite()
Unload UserFormHiLiteDays
ActiveWorkbook.Names.Add Name:="iDaysToHiLite", RefersToR1C1:=iDaysToHiLite
Call ScatterHighlightV2(True)
End Sub
Private Sub OptionButton1_Click()
iDaysToHiLite = 1
Call DaysToHiLite
End Sub
Private Sub OptionButton2_Click()
iDaysToHiLite = 2
Call DaysToHiLite
End Sub
Private Sub OptionButton3_Click()
iDaysToHiLite = 3
Call DaysToHiLite
End Sub
Private Sub OptionButton4_Click()
iDaysToHiLite = 4
Call DaysToHiLite
End Sub
Private Sub OptionButton5_Click()
iDaysToHiLite = 5
Call DaysToHiLite
End Sub
Private Sub OptionButton6_Click()
iDaysToHiLite = 6
Call DaysToHiLite
End Sub
Private Sub OptionButton7_Click()
iDaysToHiLite = 7
Call DaysToHiLite
End Sub
Private Sub OptionButton8_Click()
iDaysToHiLite = 14
Call DaysToHiLite
End Sub
Private Sub OptionButton9_Click()
iDaysToHiLite = 21
Call DaysToHiLite
End Sub
Private Sub OptionButton10_Click()
iDaysToHiLite = 28
Call DaysToHiLite
End Sub
Private Sub OptionButton11_Click()
iDaysToHiLite = 30
Call DaysToHiLite
End Sub
Private Sub OptionButton12_Click()
iDaysToHiLite = 60
Call DaysToHiLite
End Sub
Private Sub OptionButton13_Click()
iDaysToHiLite = 90
Call DaysToHiLite
End Sub
Private Sub OptionButton14_Click()
iDaysToHiLite = 120
Call DaysToHiLite
End Sub
Private Sub OptionButton15_Click()
iDaysToHiLite = 180
Call DaysToHiLite
End Sub
Private Sub OptionButton16_Click()
iDaysToHiLite = 365
Call DaysToHiLite
End Sub
Attribute VB_Name = "UserFormHolidays"
Attribute VB_Base = "0{6D67BF61-779A-4FA0-97F7-00C49574027C}{FC2F1E50-CB15-4D53-895A-5E6E5F2A3406}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Option Explicit
Const mgsTempHolidaySheet As String = "xxxTmpHolidays"
Const mgiBlankYear As Integer = 1899
Private Sub cboAccept_Click()
Call AcceptHoliday
Unload Me
End Sub
Private Sub cboAddRecurring_Click()
Call AddRecurring
End Sub
Private Sub cboAddSpecific_Click()
Call AddSpecific
End Sub
Private Sub cboCancel_Click()
Call UndoHolidayChanges
Unload Me
End Sub
Private Sub cboGenerate_Click()
Call GenerateHolidayList
End Sub
Private Sub lstRecurring_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
'Delete selected item
Dim iCnt As Integer
For iCnt = 0 To lstRecurring.ListCount - 1
If lstRecurring.Selected(iCnt) = True Then
lstRecurring.RemoveItem (iCnt)
End If
Next
End Sub
Private Sub lstSpecific_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
'Delete selected item
Dim iCnt As Integer
For iCnt = 0 To lstSpecific.ListCount - 1
If lstSpecific.Selected(iCnt) = True Then
lstSpecific.RemoveItem (iCnt)
End If
Next
End Sub
Private Sub UserForm_Initialize()
Call PopulateHolidayList
Call PopulateInputBoxes
On Error Resume Next
Application.DisplayAlerts = False
Worksheets(mgsTempHolidaySheet).Delete
Application.DisplayAlerts = True
End Sub
Public Sub PopulateHolidayList()
Dim i As Integer
Dim arrHolidays(18) As String
Dim arrHolDefSelection(18) As String
arrHolidays(0) = "New Year's Day"
arrHolDefSelection(0) = "s"
arrHolidays(1) = "New Year's Day, celebrated"
arrHolDefSelection(1) = "s"
arrHolidays(2) = "Martin Luther King Day"
arrHolDefSelection(2) = "s"
arrHolidays(3) = "President's Day"
arrHolDefSelection(3) = "s"
arrHolidays(4) = "Good Friday"
arrHolDefSelection(4) = ""
arrHolidays(5) = "Easter"
arrHolDefSelection(5) = "s"
arrHolidays(6) = "Memorial Day"
arrHolDefSelection(6) = "s"
arrHolidays(7) = "Independence Day"
arrHolDefSelection(7) = "s"
arrHolidays(8) = "Independence Day, celebrated"
arrHolDefSelection(8) = "s"
arrHolidays(9) = "Labor Day"
arrHolDefSelection(9) = "s"
arrHolidays(10) = "Columbus Day"
arrHolDefSelection(10) = ""
arrHolidays(11) = "Veterans Day"
arrHolDefSelection(11) = "s"
arrHolidays(12) = "Veterans Day, celebrated"
arrHolDefSelection(12) = "s"
arrHolidays(13) = "Thanksgiving Day"
arrHolDefSelection(13) = "s"
arrHolidays(14) = "Friday after Thanksgiving"
arrHolDefSelection(14) = "s"
arrHolidays(15) = "Christmas"
arrHolDefSelection(15) = "s"
arrHolidays(16) = "Christmas, holiday"
arrHolDefSelection(16) = "s"
arrHolidays(17) = "Christmas Eve"
arrHolDefSelection(17) = ""
arrHolidays(18) = "Christmas Eve, celebrated"
arrHolDefSelection(18) = ""
' arrHolidays(0) = ""
' arrHolidays(0) = "s"
lstHolidays.List = arrHolidays()
For i = 0 To UBound(arrHolDefSelection)
lstHolidays.Selected(i) = arrHolDefSelection(i) <> ""
Next i
End Sub
Public Sub PopulateInputBoxes()
cboWhich.List = Array(1, 2, 3, 4, 5)
cboDOW.List = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
cboMonthRecurring.List = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
cboMonthSpecific.List = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
txtStartYear = Year(Now()) - 5
txtEndYear = Year(Now()) + 5
End Sub
Public Sub AddRecurring()
'Add the recurring date
On Error GoTo ErrorHandler
Const csProc As String = "AddRecurring"
Const sDays As String = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
Dim sTextID As String
Dim sTextVisible As String
Dim sDOWNum As String
Dim sMonthNum As String
Dim sMsg As String
'check to see that the 2 required fields are populated
If cboWhich = "" Or cboDOW = "" Then
sMsg = "You must fill in the Which and Day of Week fields before adding a recurring holiday."
MsgBox sMsg, vbOKOnly, "Need More Data"
GoTo ProcExit
End If
If Not cboMonthRecurring = "" Then
sMonthNum = Month(DateValue("1 " & cboMonthRecurring & " 2000"))
End If
sDOWNum = (InStr(1, sDays, cboDOW, vbTextCompare) + 9) \ 10
sTextID = cboWhich & "," & sDOWNum & "," & sMonthNum
sTextVisible = cboWhich & OrdinalSuffix(cboWhich) & " " & cboDOW
If Not cboMonthRecurring = "" Then
sTextVisible = sTextVisible & " in " & cboMonthRecurring
End If
If gcbDebug Then Debug.Print sTextID
lstRecurring.AddItem sTextID
lstRecurring.List(lstRecurring.ListCount - 1, 1) = sTextVisible
ProcExit:
On Error Resume Next
Exit Sub
ErrorHandler:
Debug.Print err.Number & ":" & err.Description
'add more robust error messaging later
If InStr(err.Description, "Type mismatch") > 0 Then 'probably date format bad
MsgBox "It looks like maybe one of your dates isn't in the right format. Try using m/d/yyyy format.", vbOKOnly + vbInformation, "Bad Data"
Resume ProcExit
Else
Call ShowError("Error in " & csProc & ". " & err.Number & ":" & err.Description, vbOKOnly, "", 0)
'MsgBox "Error in " & csProc & ". " & Err.Number & ":" & Err.Description, vbOKOnly
End If
Resume ProcExit
Resume
End Sub
Public Sub UndoHolidayChanges()
'Return to preopening state
'if there is a backup holiday list set it to be the regular holiday list
On Error GoTo ErrorHandler
Const csProc As String = "UndoHolidayChanges"
If SheetExists(mgsTempHolidaySheet) Then
Sheets(gsHolidaySheetName).UsedRange.Clear
Sheets(mgsTempHolidaySheet).UsedRange.Copy Sheets(gsHolidaySheetName).Range("A1")
ActiveWorkbook.Names.Add gsHolidayRange, Sheets(gsHolidaySheetName).UsedRange
Application.DisplayAlerts = False
Sheets(mgsTempHolidaySheet).Delete
Application.DisplayAlerts = True
End If
ProcExit:
On Error Resume Next
Exit Sub
ErrorHandler:
Debug.Print err.Number & ":" & err.Description
'add more robust error messaging later
If InStr(err.Description, "Type mismatch") > 0 Then 'probably date format bad
MsgBox "It looks like maybe one of your dates isn't in the right format. Try using m/d/yyyy format.", vbOKOnly + vbInformation, "Bad Data"
Resume ProcExit
Else
Call ShowError("Error in " & csProc & ". " & err.Number & ":" & err.Description, vbOKOnly, "", 0)
'MsgBox "Error in " & csProc & ". " & Err.Number & ":" & Err.Description, vbOKOnly
End If
Resume ProcExit
Resume
End Sub
Public Sub AddSpecific()
On Error GoTo ErrorHandler
Const csProc As String = "AddSpecific"
Dim dDate As Date
Dim iMonth As Integer
Dim iDay As Integer
Dim iYear As Integer
Dim sTextID As String
Dim sTextVisible As String
Dim sMonth As String
Dim sMsg As String
'check to see that the 2 required fields are populated
If cboMonthSpecific = "" Or txtDay = "" Then
…
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: xl/vbaProject.bin | 3900416 bytes |
SHA-256: 23ae7063f112701f0427e6557e89c0041991d0fec5e9433c09b985106e6ed302 |
|||
emf_00.emf |
ooxml-emf | OOXML EMF part: xl/media/image1.emf | 2640 bytes |
SHA-256: 1255c4ae84a72eb8a4a904925439a3bbb5a025d7b8a1933c1f15569ddf87d4e2 |
|||
emf_01.emf |
ooxml-emf | OOXML EMF part: xl/media/image2.emf | 201632 bytes |
SHA-256: 121e5f1bbe5ccae0e94653b47596f747949d4af223cd972c1eb75bddb9c9b635 |
|||
Open this report in the interactive analyzer, or submit your own file for analysis.