+ Reply to Thread
Results 1 to 3 of 3

Error # 1004 was generated by Microsoft office Excel

  1. #1
    Registered User
    Join Date
    07-16-2008
    Location
    atlanta
    Posts
    2

    Error # 1004 was generated by Microsoft office Excel

    I have a excel report which connects to the database and pull data once I click on to "GO" button which I created as part of that excel report. Interesting part is the program generates reports fine on the following machine.
    i) Windows OS XP 2002 SP2 running Excel version of 2002 SP3

    It gives following error when I try to run the same report on a machine with Windows OS XP 2002 SP2 running Excel version of 2003 with SP1.

    Error message :-
    Error # 1004 was generated by Microsoft Office Excel
    General ODBC Error
    Context: 1001004 File: C:\Program Files\Microsoft office\OFFICE11\1033\xlmain11.chm.

    I tried to look at the xlmain11.chm file, that file is nothing but microsoft excel file.
    I would appreciate if somebody can point me in right direction of why this error is poping out on the different machine. Only difference between those machines is the Office version i.e 2002 vs 2003, I don't get it because it is running fine on office 2002 but not on office 2003.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello johnson,

    You didn't mention which database you are connecting to. It could be the ODBC connection string format changed, or some parameter that was optional in 2002 is now required in 2003. I don't have 2002 to compare with 2003, so I can't say for sure this is the problem, but it is where I would start to look.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    07-16-2008
    Location
    atlanta
    Posts
    2

    hi ross

    I tried to disect the visual basic code in the macro. I think it is trying to fail in this section (code given below). We are using informix database and informix ODBC connection to connect to database.

    Note :- following O.S with office combination works okay with
    a) Windows X.P 2002 O.S with Office Excel 2002 SP3.
    b) Windows X.P 2002 SP2 O.S with Office Excel 2003.

    But it doesnt work with following O.S with office combination.
    a) Windows X.P 2003 SP1 with office Excel 2002 SP2.


    Following is the section of the code I think 80% it is erroring out :-
    Please Login or Register  to view this content.
    The problem is this macro was created in old version of office and not running on latest version of office. When I try to click on to help when it pops out error. I see following list of things it is asking me to check in macro error

    There is an error in the macro you were running. The specified method can't be used on the specified object for one of the following reasons:
    a) An argument contains a value that is not valid
    b) The method can't be used in the applied context. Specifically, some Range object methods require that the range contain data. If the range does not contain data, the method fails
    c) An external error occured, such as a failure to read or write from a file.
    Last edited by Leith Ross; 07-17-2008 at 01:00 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1