dashboard-vba
dashboard-vba
'Create Slicers
Dim slcCache As SlicerCache
'Format Dashboard
With Sheets("Dashboard")
'Add Title
With .Range("B1")
.Value = "Parts Analysis Dashboard"
.Font.Size = 14
.Font.Bold = True
End With
'Add Legend
With Sheets("Dashboard")
.Range("B" & pvtTable.TableRange2.Rows.Count + 5).Value = "Legend:"
.Range("B" & pvtTable.TableRange2.Rows.Count + 6).Value = "AVAILABLE: Parts
with available PO"
.Range("B" & pvtTable.TableRange2.Rows.Count + 7).Value = "STOCK: Parts
currently in stock"
.Range("B" & pvtTable.TableRange2.Rows.Count + 8).Value = "SHORTAGE: Parts
with procurement pending"
End With
'Error handling
If Err.Number <> 0 Then
MsgBox "An error occurred while creating the dashboard. Error: " &
Err.Description
End If
End Sub