Hi everyone,
I have a report that updates data when the dates are changed either in field C2 (from) or field F2 (to). It goes like this:
This works well in Excel 2010, but it gives an "Object variable or With block variable not set" from 2013 onwards.
The file has a lot of macros as it's a complex reporting file with several capabilities, and the message is displayed when the user clicks on the enable content button.
Debugging, it leads you to the ActiveSheet.Name, and a msgbox ActiveSheet.Name returns the same error message above, so it's like excel it's not identifying the current sheet.
Any ideas of what could I try?
Thank you
I have a report that updates data when the dates are changed either in field C2 (from) or field F2 (to). It goes like this:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim TValue As String, TAddress As String, Tsource As String
If Target.Address = "$C$2" Or Target.Address = "$F$2" Then
TAddress = Target.Address
TValue = Target
Tsource = ActiveSheet.Name
Call Date_Change(TValue, TAddress, Tsource)
End If
End Sub
The file has a lot of macros as it's a complex reporting file with several capabilities, and the message is displayed when the user clicks on the enable content button.
Debugging, it leads you to the ActiveSheet.Name, and a msgbox ActiveSheet.Name returns the same error message above, so it's like excel it's not identifying the current sheet.
Any ideas of what could I try?
Thank you