Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jayden Brown   on Oct 01 In MS Office Category.

  
Question Answered By: Abaddon Cohen   on Oct 01

I did put a breakpoint on the line "Sub autosavMacro" . . . and
stepped thru it fine, no problems there . . . when it autofired, and
when I just ran it independenly . . . that part appears to work in
all the various ways it is called.

The error happens as marked in the following:

The 1004 error I'm getting is in the ThisWorkBook code of:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dTime, "autosavMacro", , Schedule:=False
'<---The error happens there
End Sub

'<---which I understood was necessary to shut off the scheduled
'<---firing of the autosave, so the user could do other things
'<---that's what I understood from the ozgrid page mentioned above

--that is, when the workbook is closed.
--And, by the way, after my last post here on the group, I got
the autosavMacro to fire every 5 minutes, like I was trying to get
it to do. As far as I can tell, the rest of it works fine. I just
get the 1004 error on that line only when I try to close the
workbook.

I've looked at that line forwards and backwards and tried several
ways to write it, and got the same error. Other advice or
suggestions, please?

Share: 

 

This Question has 5 more answer(s). View Complete Question Thread

 


Tagged: