doctorhifi
New Member
- Joined
- Aug 13, 2013
- Messages
- 19
I created a worksheet that contains many unique formulas in each cell.
The user is allowed to overwrite and/or modify the formulas in each cell, but double-clicking on the cell will always reinsert the original formula into the cell. The original formulas are contained within the VBA Objects for the sheet. Obviously I'm using Private Sub Worksheet_BeforeDoubleClick event to achieve this.
Problem is, my procedure is now so long that I get a Procedure Too Large error.
I am wondering how to split the procedures into two parts.
Here is an example of the code within my worksheet:
</hundreds>
The user is allowed to overwrite and/or modify the formulas in each cell, but double-clicking on the cell will always reinsert the original formula into the cell. The original formulas are contained within the VBA Objects for the sheet. Obviously I'm using Private Sub Worksheet_BeforeDoubleClick event to achieve this.
Problem is, my procedure is now so long that I get a Procedure Too Large error.
I am wondering how to split the procedures into two parts.
Here is an example of the code within my worksheet:
Rich (BB code):
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("xxxx")) Is Nothing ThenRange("xxxx").Value = ("=1+2")
Cancel = True
End If
<hundreds more="" lines="" of="" similar="" code="">---Hundreds of more lines of code similar to the above---
End Sub