How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Bryan Your Own Question

Bryan
Bryan, Computer Enthusiast
Category: Microsoft Office
Satisfied Customers: 1417
Experience:  Have been using MS Office since
59162784
Type Your Microsoft Office Question Here...
Bryan is online now
A new question is answered every 9 seconds

Getting run-time error 1004 running excel visual basic macrofound

Resolved Question:

Getting run-time error 1004 running excel visual basic macro

found Microsoft fix but not sure how to use it.

Need visual basic help
Submitted: 1 year ago.
Category: Microsoft Office
Expert:  Bryan replied 1 year ago.

JBryan42 :

Welcome to JustAnswer. My name is XXXXX XXXXX I will be assisting you today. Please do not rate this session until it has been completed.

JBryan42 :

Can you send me a copy of the macro as it is now?

Customer:

Yes It is in an excel file

JBryan42 :

Ok. Can you zip the file then attach it to me using the paperclip icon?

Customer:

Where to send

JBryan42 :

Or, upload it to wikisend.com and tell me the file id they assign

Customer:

OK one minute

Customer:

193198

JBryan42 :

ok. Give me a few minutes to check it out.

Customer:

No problem

JBryan42 :

Oh, what version of Excel?

Customer:

2007

JBryan42 :

hmmm ... the only version I don't have installed. Well, let's see what 2003 does.

Customer:

This macro worked for years with older operating system and older excel. The problem started when we tried to use the macro on newer computers

JBryan42 :

Yeah, the problem does look like it was introduced in 2007. But the workaround will work for all versions.

Customer:

OK

Customer:

If you want to test you need to put a number in any 'todays score' cell and do a CTRL T to run

JBryan42 :

Ok

JBryan42 :

Do you mean "Today's Round"? Because I don't see "Today's Score"

Customer:

todays round sorry

JBryan42 :

Ok

JBryan42 :

hmmm ... I can't replicate the error. I'll opt out for now and install Office 2007. If someone else doesn't come along to fix it before I get back then I'll opt back in to continue working with you. But I don't want to hold you up while I set up the environment.

Customer:

OK thanks. What do I do? Ask another question?

Customer:

Does the macro work for you?

JBryan42 :

Nope. Just keep an eye on your email. As soon as someone else or myself are ready, you'll get an email letting you know. I'll take care of everything else on this end. So for now you can just "Save and Exit"

JBryan42 :

Yeah, the macro works for me in 2003

JBryan42 :

I'll try it in 2010 before installing 2007 though

Customer:

Thanks again

JBryan42 :

No problem. Maybe talk to you soon.

Expert:  Lindie-mod replied 1 year ago.

Hello,


I’m Lindie, and I’m a moderator for this topic. Thank you for your patience, your business is very important to us, we are waiting on another professional with the right expertise to come online. Feel free to let us know if you would like us to continue searching for a professional or if you would like us to close your question. We appreciate your understanding!

Best,

Lindie

Customer: replied 1 year ago.


I would like to wait for a new pro. I think I can rephrase the question to simplify the fix

Expert:  Lindie-mod replied 1 year ago.

Hello,

Thank you, XXXXX XXXXX continue to look for a professional to assist you. Please let me know if I can be of any further assistance while you wait.

Best,

Lindie

Customer: replied 1 year ago.

OK

Expert:  Bryan replied 1 year ago.
Ok. I've got Office 2007 up and running. I've tested the Ctrl-T macro and it runs through without any problem. I only put a single value in the top entry for "Today's Score" though. Can you give me a situation that will cause it to fail?
Customer: replied 1 year ago.

What windows are you running? I run version 7.


 


You described the exact condition to make it fail. I don't understand what is going on? Would you try it again?


You only need one entry in the Todays Round' to run.


 


I found a microsoft fix for this exact error when running excel. There is a loop in this macro that runs through each player and it does an active ActiveSheet.paste after each player is computed. That is the error I am getting. The fix involves adding code to save the activesheet to a temporary area, zero it out and then reload it after a few iterations.


 


Did you make any changes?


We have been emailing this excel file to each other could that affect it..


 


If we can get it running without adding code that would be great.


 


I will be back this afternoon and I do appreciate your interest and help in fixing this bug


 


The microsoft link is


 


support.microsoft.com/kb/210684

Expert:  Bryan replied 1 year ago.
I installed Office 2007 on a Vista machine. I'll install it again on a 7 machine and test it. If I can get it to fail on the Windows 7 machine I can add the code from the Microsoft link.

Emailing the file back and forth shouldn't cause any problems. Error checking makes sure of that.
Customer: replied 1 year ago.


IHope it fails. We have one member with an old computer that runs this prgram and everyone he has sent it to has had an error, including me. I have a vista laptop and it fails there and I have a windows 7 desktop that it fails on too.


 


I'm stumped.


 


I'll try running it a few times and see what happens

Customer: replied 1 year ago.


It gets the error on the first player each time it runs.

Expert:  Bryan replied 1 year ago.
Can you fill in the data like you normally would, then save the spreadsheet and send it to me without running the macro? Maybe that will help.
Customer: replied 1 year ago.

Will try it.


wiki 519986

Customer: replied 1 year ago.


I filled in two scores bujt am not sure if it's in the file I sent let me make sure and resend


413146 I saved this one just before I sent it, it has 2 scores in it and has not been run

Expert:  Bryan replied 1 year ago.
Ok. I'm almost done setting up the next Windows 7 machine.
Customer: replied 1 year ago.


No problem. No rush


 


I'm out a lot during the day.

Customer: replied 1 year ago.


I ran the macro on my windows 7 laptop and it asked where the data was with '=$N$11' in the window. I pressed continue and it gave me an error saying it can't shift data off the sheet.


 


I'll try again

Expert:  Bryan replied 1 year ago.
I did get that one time on 2003 but then the next time I ran it there was no problem.
Expert:  Bryan replied 1 year ago.

Well, it runs through Office 2007 on Windows 7 64 without any problem on my end. Can you make sure that you have all Windows updates installed? That includes all important and optional. Also, how much RAM is installed on the machines with problems?

The fix from Microsoft only applies to Office 2003. I can add the code to save, close and reopen the worksheet every so often, but I really don't think that's going to do anything.

Customer: replied 1 year ago.

I agree especially because it gives me an error on the first player.


 


I'll make sure everything is updated and get back.


 


I'm thinking that my excel may be the culprit since it is on all three of my computers. It is the student edition and perhaps I need an upgrade.


 


I do have one question. How can I display line numbers on the macro code?

Expert:  Bryan replied 1 year ago.
I haven't seen any addon that adds the line number to the code. But you can see the line number on the ribbon bar. Like "Ln 1, Col 1"
Customer: replied 1 year ago.


I sent the file to another friend who has excel 2007 and he gets the same 1004 error.


 


I installed excel 2003 on my desktop and the excel macro runs fine.


 


Can't guess why it runs OK on your machine.

Expert:  Bryan replied 1 year ago.
I've tried it on 2003 w/ XP, 2007 w/Vista and Win 7, and 2010 w/ Win 7 ... all combinations went perfectly.

Ok, if I can't get it to fail let's have you debug it.

Right click on this line:
ActiveCell.SpecialCells(xlLastCell).Select

Then choose "Toggle", "Breakpoint"
You'll see the breakpoint show up at the left. Next hit go back over to the spreadsheet and hit Ctrl-T. VB will come back up and be paused at that line. Hit "F8" until you get an error. As soon as the error comes up, tell me the line of code that caused the error and as much info about the error that you can see.
Customer: replied 1 year ago.


Amazing.


 


I'll give the debug a shot.


 


I get the error on the ActiveSheet.Paste


after the Range(shift_scores_over..).select about half way through the sub


Shift_scores_over equals E4

Expert:  Bryan replied 1 year ago.
Ok. If Activesheet.paste is having a problem for some reason, we'll do it another way.

Try this: http://wikisend.com/download/689104/blue&white quota sheet.zip
Customer: replied 1 year ago.


can you send the file unziped? I get an error 'incorrect command line'


when I try to unzip

Customer: replied 1 year ago.


Never mind the resend I unzipped it and it works perfect.


 


Thanks for the re-write

Expert:  replied 1 year ago.
No problem. Glad we finally got it fixed for you. Let me know if you need anything else.
Bryan, Computer Enthusiast
Category: Microsoft Office
Satisfied Customers: 1417
Experience: Have been using MS Office since
Bryan and 5 other Microsoft Office Specialists are ready to help you
Customer: replied 1 year ago.


I rated you excellent. Thanks again

Expert:  Bryan replied 1 year ago.
Thank you! And thank you for the bonus too. :) Please let me know if you need anything in the future.

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
 
 
 

Meet The Experts:

 
 
 
  • jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
< Last | Next >
  • http://ww2.justanswer.com/uploads/JS/jstinehelfer/2012-6-6_215146_Pictureofme1.64x64.png jstinehelfer's Avatar

    jstinehelfer

    Information Systems Manager

    Satisfied Customers:

    36
    A+ Comptia Certified computer repair
  • http://ww2.justanswer.com/uploads/JA/JasonJames122/2011-12-16_135647_jasonjamesheadshotweb.64x64.jpg JasonJames122's Avatar

    JasonJames122

    Computer Enthusiast

    Satisfied Customers:

    0
    I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business
  • http://ww2.justanswer.com/uploads/JE/jessmagz/2012-6-6_18129_jm.64x64.jpg Jess M.'s Avatar

    Jess M.

    Computer Support Specialist

    Satisfied Customers:

    301
    Computer Software Specialist for more than 10 years
  • http://ww2.justanswer.com/uploads/CH/chutz747/2011-11-6_14231_me.64x64.jpg The-PC-Guy's Avatar

    The-PC-Guy

    Computer Manager

    Satisfied Customers:

    274
    20 years experience providing remote computer support
  • http://ww2.justanswer.com/uploads/SP/spherrod/2012-6-6_174244_1000852.64x64.JPG Steve Herrod's Avatar

    Steve Herrod

    Computer Support Specialist

    Satisfied Customers:

    125
    Trained in Microsoft Office from 2000 through to latest version 2010.
  • http://ww2.justanswer.com/uploads/SE/Seashore2011/2011-12-6_33418_111205223015.64x64.jpg Chris L.'s Avatar

    Chris L.

    Support Specialist

    Satisfied Customers:

    124
    Certified Expert with over 10 years experience.
  • http://ww2.justanswer.com/uploads/KR/krkljatorm/2012-6-24_153417_ITMiro.64x64.jpg IT Miro's Avatar

    IT Miro

    Computer Scientist

    Satisfied Customers:

    97
    Bachelor's Degree in Information Technology, Microsoft Certified Professional
 
 
 

Related Microsoft Office Questions

Chat Now With A Microsoft Office Technician
Bryan
Bryan
55 Satisfied Customers
Have been using MS Office since