GEORGE PERRY
03-08-2021, 09:03 AM
please my excel app is not running this is giving
run time error '91':
object variable or with block variable is not set
28072
dsh.AutoFilterMode = False
dsh.Range("H:").NumberFormat = "dd-mm-yyyy"
'''''''''Put filter here''''''
dsh.UsedRange.AutoFilter 8, ">=" & Me.txt_Start_Date.Value, xlAnd, "<=" & Me.txt_End_Date.Value
If Me.OptionButton3.Value = True Then
dsh.UsedRange.AutoFilter 3, "Purchase"
End If
If Me.OptionButton2.Value = True Then
dsh.UsedRange.AutoFilter 2, "Sale"
End If
sh.UsedRange.Clear
dsh.UsedRange.Copy
sh.Range("A1").PasteSpecial xlPasteValuesAndNumbersFormat
dsh.AutoFilterMode = False
run time error '91':
object variable or with block variable is not set
28072
dsh.AutoFilterMode = False
dsh.Range("H:").NumberFormat = "dd-mm-yyyy"
'''''''''Put filter here''''''
dsh.UsedRange.AutoFilter 8, ">=" & Me.txt_Start_Date.Value, xlAnd, "<=" & Me.txt_End_Date.Value
If Me.OptionButton3.Value = True Then
dsh.UsedRange.AutoFilter 3, "Purchase"
End If
If Me.OptionButton2.Value = True Then
dsh.UsedRange.AutoFilter 2, "Sale"
End If
sh.UsedRange.Clear
dsh.UsedRange.Copy
sh.Range("A1").PasteSpecial xlPasteValuesAndNumbersFormat
dsh.AutoFilterMode = False