Hi,
does anyone know how to stop a user from creating a circular reference using VBA code. For example if the user tries to create one a msg pops up saying that the user is not allowed to create circular references
thanks
Hi,
does anyone know how to stop a user from creating a circular reference using VBA code. For example if the user tries to create one a msg pops up saying that the user is not allowed to create circular references
thanks
Hi
This is pretty brutal but perhaps.
Sheet event code
If you create a circular reference on the sheet, then it will still show the normal error message, but also give you the additional message, and then clear the formula from one of the cells in the circular reference.![]()
Private Sub Worksheet_Calculate() On Error Resume Next fred = ActiveSheet.CircularReference.Select On Error GoTo 0 If Not IsEmpty(fred) Then MsgBox "No No" ActiveCell.ClearContents End If End Sub
HTH
rylo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks