Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Macro Won't Run on Certain Machines

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I searched both here and on msdn for info on this and have been unsuccessful.

    I have a Macro that I created on one machine and will not run on the other. I get the following error message...

    Run-time Error '1004'
    Application-defined or object-defined error

    Both machines are running...
    WinNT 4.0 SP6
    Excel 2000 9.0.4402 SP-1
    VB 6.0
    VB Version 8967
    VBA: Retail 6.0.8714
    Forms3: 2.01

    I also checked the VB TOOLS->REFERENCES and they matched exactly.

    Any suggestions on what to do?

    Thanks-
    Thomas

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,940
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hello mate,

    It's always best to post your code. In this case error 1004 as you described is a general error and could be one of many things - difficult to diagnose without seeing the code.

    Regards,
    Dan

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    what version was the code orig from I had some code in xp that would not work in 2000 but would work in 97 and so on may pay to go through the code and debug it if you know how to do that otherwise post your code and someone will be able to do that for you maybe

  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I was able to figure out the problem. I was using Windows("Workbook_Name.xls").Activate when I should have been using Workbooks("Workbook_Name.xls").Activate.

    Everything works just fine now...

    Thanks-
    Thomas

  5. #5
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    So the "certain" machines it wouldn't run on were all those with Windows and Excel installed on them.

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi --

    for years and years i have disagreed on this but from today im convinced thisis true WHY?? no ideas yey, just wild quesses.

    My cmpany has rolled out XP Win and XP Office now some of my VBA wont work, ie calculation codes,,, ???

    And im still on the old server.. ODD. i get fails as break in close program menu?? no reason and heavy crashes, all codes ive used and not developed in months..

    seems things do get upset.

    sorry no fix,,, but i see your problems..


    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •