Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Option Explicit Private Sub Worksheet_Activate() UpdateValues 'UpdateStatisticsValues End Sub Sub UpdateValues() Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets("Statistics") Dim shpTotalOrders As ShapeRange Dim shpTotalCustomers As ShapeRange Set shpTotalOrders = ws.Shapes.Range(Array("TotalOrders")) Set shpTotalCustomers = ws.Shapes.Range(Array("TotalCustomers")) Dim lngOrders As Long Dim intCustomers As Integer 'Doesn't work? On Error GoTo Hell lngOrders = Application.WorksheetFunction.Count(Range("Orders[ID]")) intCustomers = Application.WorksheetFunction.CountIf(Range("Customers[Orders]"), ">0") shpTotalOrders.TextFrame2.TextRange.Characters.Text = lngOrders shpTotalCustomers.TextFrame2.TextRange.Characters.Text = intCustomers Set ws = Nothing Set shpTotalOrders = Nothing Set shpTotalCustomers = Nothing Hell: MsgBox "There was a problem." End Sub