Application-defined or Object-defined error

p4nny

Board Regular
Joined
Jan 13, 2015
Messages
246
Hi

I'm getting this error in the following formula:
If I remove everything from below displayAlerts = false to above
Application.DisplayFullScreen = False

vba works fine...


Private Sub Button6_saveClose()
stopsaveTimer
DisplayAlerts = False
Worksheets("work record").Range("bp13").AutoFill Destination:=Range("BP13:BP4000")
Worksheets("work record").Range("k13").AutoFill Destination:=Range("k13:k4000")
Worksheets("work record").Range("j13").AutoFill Destination:=Range("j13:j4000")
Range("F2").FormulaArray = "=SUM(IF(FREQUENCY(IF($K$13:$K$4000=TODAY(),IF(LEN($B$13:$B$4000)>0,MATCH(""~""&$B$13:$B$4000,$B$13:$B$4000&"""",0))),ROW($B$13:$B$4000)-ROW(B13)+1)>0,1))"
Range("F3").Formula = "=COUNTIFS($K$13:$K$4000,TODAY(),$B$13:$B$4000,""<>""&"""",$J$13:$J$4000,""complete"")"
Range("F4").Formula = "=COUNTIFS($K$13:$K$4000,TODAY(),$B$13:$B$4000,"" <>""&"""",$J$13:$J$4000,""<>""&""complete"""
Application.DisplayFullScreen = False

ThisWorkbook.save
ThisWorkbook.Close
End Sub

thanks for your help
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
fails on line:
Code:
Range("F4").Formula = "=COUNTIFS($K$13:$K$4000,TODAY(),$B$13:$B$4000,"" <>""&"""",$J$13:$J$4000,""<>""&""complete"""

since it's almost identical to the line above it, it seems you forgot your closing ')'

change to
Code:
Range("F4").Formula = "=COUNTIFS($K$13:$K$4000,TODAY(),$B$13:$B$4000,"" <>""&"""",$J$13:$J$4000,""<>""&""complete"")"
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,265
Members
449,219
Latest member
daynle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top