Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ran into this error 1004 while running the lines below

ThisWorkbook.Sheets("Master").Range(grossrow).Value =

ThisWorkbook.Sheets("Master").Range(freerow).Value =

The strange thing is sometimes it works but sometimes it doesn't. The data it is running through is very huge, around 18000 rows.

Anyone have any idea on why it happens?

share|improve this question
What do you mean with "sometimes it works"? Does it run fully through all lines and sometimes not? Or does it run through the first lines and stops after a while? Can you shorten your 18000 rows and reproduce the error? – nixda Dec 28 '12 at 11:40
Sometimes the line is able to compute and come out with the results. I just shorten the data to 10 rows and confirm it is not working. Is there anything wrong with the way the code is written? – VBquestion Dec 31 '12 at 1:21
Do these 10 lines contain sensitive information? Would you share your stripped down .xls sheet? I need some pastime for the night. – nixda Dec 31 '12 at 1:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.