excel vba The With block must be initialized by executing the With statement. code example Example: System.NullReferenceException: 'Object variable or With block variable not set.' Dim x As String