rickincanada
Board Regular
- Joined
- Aug 31, 2010
- Messages
- 61
I am running the following code on one of my worksheets ("Deal Info" / Sheet3) however for some reason one of the users of this workbook is getting a Run-time error '91': Object variable or With block variable not set message when they open another workbook and this one is open. Here is the line where VBA takes me on debug:
Private Sub Worksheet_Calculate()
Static OldVal As Variant
If ActiveWorkbook.ActiveSheet.Name = "Deal Info" Then
If ActiveSheet.Range("F25").Value <> OldVal Then
OldVal = Range("F25").Value
Call OptionFilter
ActiveWorkbook.Sheets("Deal Info").Select
End If
End If
End Sub
It highlights the "If ActiveWorkbook.ActiveSheet.Name = "Deal Info" Then" section. The strange thing is that I can't recreate the issue and none of the other 30+ people who use this workbook have complained about this issue. Any help here would be greatly appreciated!!!
Private Sub Worksheet_Calculate()
Static OldVal As Variant
If ActiveWorkbook.ActiveSheet.Name = "Deal Info" Then
If ActiveSheet.Range("F25").Value <> OldVal Then
OldVal = Range("F25").Value
Call OptionFilter
ActiveWorkbook.Sheets("Deal Info").Select
End If
End If
End Sub
It highlights the "If ActiveWorkbook.ActiveSheet.Name = "Deal Info" Then" section. The strange thing is that I can't recreate the issue and none of the other 30+ people who use this workbook have complained about this issue. Any help here would be greatly appreciated!!!