Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


Saving worksheet

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
grizzly



Joined: 05 Feb 2008
Posts: 5

PostPosted: Wed Nov 19, 2008 9:58 pm    Post subject: Saving worksheet Reply with quote

When I close my worksheet and reopen it this formula no longer works is there a special way to close out. When I create this sheet it works great
I relize I must set macros at low or medium settings but do I have to leave the security set low for this to work without continuously changing it as I would prefer to keep a high security setting

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
Back to top
View user's profile Send private message
mohan.ankur
Moderator
Moderator


Joined: 02 Aug 2006
Posts: 52

PostPosted: Fri Dec 19, 2008 3:21 pm    Post subject: Reply with quote

Try putting in Application.Volatile

In the function code.

Hope this helps.
_________________
http://www.exceldepot.com
http://www.xlmacros.com
http://www.learnexcel.org
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group