Results 1 to 7 of 7

Problem with calculating

Threaded View

  1. #1
    Registered User
    Join Date
    10-25-2004
    Posts
    12

    Problem with calculating

    I have a spreadsheet in which I'm trying to prevent users from accidentally modifying cells containing formulas. On occasion, however, they will need to manually input data instead of allowing the formula to calculate. Using info found on this forum I put
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Const WS_RANGE As String = "D9:O9"
    On Error Resume Next
    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    Application.ScreenUpdating = False
    frmChange.Show
    Application.ScreenUpdating = True
    End If
    End Sub
    into the worksheet. frmChange.Show asks the user if s/he would like to change the contents of the cell and contains
    Private Sub cmdNo_Click()
    ActiveCell.Offset(1, 0).Select
    Unload Me
    End Sub
    
    Private Sub cmdYes_Click()
    ActiveCell.ClearContents
    Unload Me
    End Sub
    This works perfectly for me accept that if the user clicks 'Yes' then the entire workbook recalculates. Having had other recalculation problems in the past, is there a way to prevent the recalculation of the entire worksheet? Basically what I'm looking for is a way to get the same effect as setting Calculation to Manual, except that during the course of normal data entry I need the cells containing formulas to calculate.
    Last edited by Prometheus; 09-23-2005 at 04:09 PM.

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