Periodic error is stumping me

P

Papa Jonah

One of the macros that I have been running is used to clear the contents of a
worksheet to eliminate any obstacles when new data is pasted into the sheet
to work with. It is a simple macro however, every now and again when I run
it, I get a response that some file (always a file previously copied from
this workbook and saved seperately) can not be found. However, you can see
that the file is not referenced in the macro. When I run the macro from the
list, it works. Somehow the button that I have assigned is getting
corrupted. Any ideas?

Cells.Select
Selection.ClearContents
Range("A1").Select
ActiveCell.FormulaR1C1 = "Paste Query Here"
'Range("A1").Select
Selection.Interior.ColorIndex = 6
ActiveSheet.Name = "new"

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top