+ Reply to Thread
Results 1 to 4 of 4

changing cell triggers Run-time error 1004

  1. #1
    Registered User
    Join Date
    02-24-2004
    Posts
    12

    changing cell triggers Run-time error 1004

    I have an Excel 2003 spreadsheet used to calculate doses of medication. The value of several cells will depend on what optionbuttons the user selects.

    I have entered the first two lines of code below w/o a problem to make certain calculations that are displayed in the specified cells. I then tried to make an additional calculation to display in cell 6,9, but it always triggers a "Application-defined or object-defined error". For troubleshooting purposes, I moved that line of code directly under the other two lines of similar code that I know work, and simplified the problem line to just arbitrarily set the value of the cell to a value of 2 (instead of the actual formula); it still triggers the error.

    Please Login or Register  to view this content.
    I really would appreciate insight as to why this simple change in a cell value is triggering an error. I've attached the file. To trigger the error, pull up the worksheet "CRI Calculator" and click on either of the optionbuttons with blue text, or double-click on a name in the list-box. The worksheet is protected but it has no password, so it should unprotect easily. Thanks!
    Attached Files Attached Files
    Last edited by Langston; 09-09-2009 at 11:36 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: changing cell triggers Run-time error 1004

    The sheet is protected and the cell is locked?

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: changing cell triggers Run-time error 1004

    Confirming - once protection is removed and cell property is set to unlocked the code runs w/o error.

    See this helpful link
    Macro Code To Run Macros On Protected Worksheets

  4. #4
    Registered User
    Join Date
    02-24-2004
    Posts
    12

    Re: changing cell triggers Run-time error 1004

    Missed that one! Thanks for the solution and rapid response.

+ 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