1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel VB Macro problems

Discussion in 'Business Applications' started by scs-04, Aug 3, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. scs-04

    scs-04 Thread Starter

    Joined:
    Jan 10, 2005
    Messages:
    118
    I am supporting a company that had someone design a very complex Excel file to take care of their Inventory and shipping. It has about 100 macros some simple and some with more complex VB. Well I setup a few new PC's out there and the new PC's cannot work with this file. They can open the file with no problem and run some of the macros from action buttons but other ones stop with an error message of undefined variable. All of the existing PC 's can run it fine and they are running a mix of Office XP and 2003. On the new PC's I have done a FULL install of office 2003 and even loaded some Visual Studio software they had, but I still get no luck. Is there some custom DLL's on the existing PC's that need to be copied to the new ones?? Any advice is appreciated.

    Thanks
     
  2. OBP

    OBP Temporarily Banned

    Joined:
    Mar 8, 2005
    Messages:
    19,889
    Can you tell which variable(s) is undefined?
    Can you post the a copy of the Workbook on here, it does not need to have any data in it, just the worksheets, Macros and VBA.
     
  3. Jimmy the Hand

    Jimmy the Hand

    Joined:
    Jul 28, 2006
    Messages:
    1,223
    Once I created a database in MS Access with extensive macro support. My Windows XP and MS Office was Hungarian. The code was OK, but it just didn't run in English environment, and shouted error messages similar to yours.

    If the OS-es on old PS-s and the new PC-s are of different language, then I have just the solution for you.
     
  4. scs-04

    scs-04 Thread Starter

    Joined:
    Jan 10, 2005
    Messages:
    118
    Thanks for the replies.

    It's not a language issue.

    how do I post the workbook up to the site??
     
  5. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Click the "Manage attachments" button at the bottom of the post composition page, then browse to the file that you want to attach from your local hard drive & upload.
     
  6. OBP

    OBP Temporarily Banned

    Joined:
    Mar 8, 2005
    Messages:
    19,889
    You have to click the "Go Advanced" button before the Manage Attachments is available.
    If the Workbook is very large you will have to Zip it as there is a size limit to attachments.
     
  7. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Sorry, that didn't occur to me as I always go straight for "Post a reply". Thanks for the catch. (y)
     
  8. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    If the macro works on one computer and not another then it is more than likely due to missing object references.

    In the VB Editor you can click on TOOLS --> REFERENCES and check to make sure all necessary object libraries are referenced. Compare what is referenced on the the machine the works with what is referenced on the machine that doesn't work and adjust accordingly. Does this workbook interact with other applications such as Outlook or Word?

    Rollin
     
  9. scs-04

    scs-04 Thread Starter

    Joined:
    Jan 10, 2005
    Messages:
    118
    Thanks again for all the replies.

    Is there a quick and easy way to delete all the data from the worksheets so I can post a copy of it here??

    Thanks
     
  10. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    That's a pretty dangerous request given we've NO idea of your data layout. :eek:

    You can perform actions on multiple sheets in one go if you group the sheets first. You do this by clicking the sheet tabs while holding CTRL (if you want to group individual sheets -- SHIFT if you want to group "all sheets in between").

    Whatever you do, make sure you save BEFORE doing any mass deletion.
     
  11. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    I think Rollin has it here, sounds like a reference issue. I would recommend you try to develop a file/application that is self-sufficient, updateable and well documented.
     
  12. scs-04

    scs-04 Thread Starter

    Joined:
    Jan 10, 2005
    Messages:
    118
    OK, when I go in to VB editor and go to refereneces I have 4 boxes checked but one of them says MISSING:NbDocViewerLib. It points to a Windows Journal Viewer DLL, the Dll is: JVVWCTL.DLL. Is this something I need to get and install from somewhere??

    Thanks
     
  13. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    If you're using it for something, then yes, you'll need to register the dll. First things first, uncheck the MISSING reference and save the workbook.
     
  14. scs-04

    scs-04 Thread Starter

    Joined:
    Jan 10, 2005
    Messages:
    118
    I am still having trouble with this and can;t figure it out. I wanted to post it up here for some of you to take a look at but even when I zipped it up it is over 5MB. Anyone have any ideas for me??

    Thanks
     
  15. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Go to www.yousendit.com and send the file to yourself. After sending the file the website will provide you with a download link that you can post. If you are still having the same problems with object references then the problem is likely related to the settings on the machine running the code. My guess is that some add-in or other needed program is missing from the faulty machines. You can download the DLL at

    http://www.dlldump.com/download-dll-files_new.php/dllfiles/J/JVVWCTL.DLL/1.5.2315.30/download.html

    Rollin
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/489121

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice