G
grizzly6969
If I use vba to create a running total and save and close my worksheet the
formula will not work unless I set macros to low security setting. I share
the computer and do not want the security left on low.
Is there a way to save the worksheet and leave macros security setting to
remain on high and only allow this worksheet to work
this is the formula I have been working with
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim rng As Range
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
Set rng = Target
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Add A2's value to B2
Target.Offset(0, 1).Value = Target.Offset(0, 1).Value + Target.Value
Application.EnableEvents = True
End Sub
formula will not work unless I set macros to low security setting. I share
the computer and do not want the security left on low.
Is there a way to save the worksheet and leave macros security setting to
remain on high and only allow this worksheet to work
this is the formula I have been working with
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim rng As Range
' Only look at single cell changes
If Target.Count > 1 Then Exit Sub
Set rng = Target
' Only look at that range
If Intersect(Target, rng) Is Nothing Then Exit Sub
' Add A2's value to B2
Target.Offset(0, 1).Value = Target.Offset(0, 1).Value + Target.Value
Application.EnableEvents = True
End Sub