+ Reply to Thread
Results 1 to 2 of 2

ERROR WITH MACRO EXCEL

  1. #1
    Consuelo Sanchez
    Guest

    ERROR WITH MACRO EXCEL


    Hi!

    I have a problem!

    I have a program made in Delphi 7,
    I try to read cells of a worksheet, in a Excel Document, and each cells has
    a value, and I to change this value to other.
    But, when this ocurred, Excel to calculate a Macro that is in other cell,
    I need, turn off tha macros in this worksheet,
    and I need to know when the cell contain a value that is a function ('= '),
    this problem , I think that ocurred when the program read
    the cell with the formula, or when Excel to calculate the formula because I
    to change the value of the cells.

    the error is the next : Could not convert variant of type (Error) into type
    String

    And,, If I delete the column with cells that contain the formula
    =BUSCAR(I9,'Calif Num y Letra'!A1:B90)
    the error not is ocurred.

    this program was compiled on Delphi 5 with other files of Office (TLB),
    to programming in the objects of EXCEL for applications. In this case the
    error not ocurred.

    Thanks for your help!!

    Connie,,,
    Exito Software
    Mexico



  2. #2
    NickHK
    Guest

    Re: ERROR WITH MACRO EXCEL

    Not a 100% sure what you are looking for, but do these help:
    Application.Calculation=xlCalculationManual
    Range("YourData").Calculate
    or
    Application.EnableEvents=False

    depending if you undesirable changes are generated by recalculating a cell
    or driven by a WS event.

    NickHK

    "Consuelo Sanchez" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hi!
    >
    > I have a problem!
    >
    > I have a program made in Delphi 7,
    > I try to read cells of a worksheet, in a Excel Document, and each cells

    has
    > a value, and I to change this value to other.
    > But, when this ocurred, Excel to calculate a Macro that is in other cell,
    > I need, turn off tha macros in this worksheet,
    > and I need to know when the cell contain a value that is a function ('=

    '),
    > this problem , I think that ocurred when the program read
    > the cell with the formula, or when Excel to calculate the formula because

    I
    > to change the value of the cells.
    >
    > the error is the next : Could not convert variant of type (Error) into

    type
    > String
    >
    > And,, If I delete the column with cells that contain the formula
    > =BUSCAR(I9,'Calif Num y Letra'!A1:B90)
    > the error not is ocurred.
    >
    > this program was compiled on Delphi 5 with other files of Office (TLB),
    > to programming in the objects of EXCEL for applications. In this case the
    > error not ocurred.
    >
    > Thanks for your help!!
    >
    > Connie,,,
    > Exito Software
    > Mexico
    >
    >




+ 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