Share via

Run time error 1004, Cannot access file

Anonymous
2016-01-12T04:46:11+00:00

Hi All.......

Windows XP, Excel 2010......my big macro was working fine and all of a sudden didn't.

In the earlier part of the macro I open a new file and saveas with a new filename.  then I import some smaller sheets into it, (4-5 or so) and massage them a bit and then resave the file with

Application.DisplayAlerts = False

ActiveWorkbook.SaveAs Filename:=Consolidator & SelectedQuotenumber & ".xlsm"

Application.DisplayAlerts = True

It was working fine for some time and now breaks on the second SaveAs line with the error message "Run time error 1004, Cannot access Consolidator131.xlsm.....which is the result of "consolidator & selectedQuoteNumber"

Don't know why it quit working, nor how to fix.........any ideas would be much appreciated.

Vaya con Dios,

Chuck, CABGx3

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2016-01-12T19:17:08+00:00

OK Guys, crisis is over......dunno why, but I reworte the whole macro and all is fine now.  Must have been some kind of invisible bug...lol

Vaya con Dios,

Chuck, CABGx3

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-01-12T05:49:12+00:00

    Negative, no passwords, and I'm the only one with access to the file

    Chuck, CABGx3

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-01-12T05:00:20+00:00

    Hi

    Have you (or someone else) password protected some of the cells or the worksheet? That is one possibility for this error.

    Regards

    Murray

    Was this answer helpful?

    0 comments No comments