LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Undo changes in range

Hello to all

When the user CHANGES an entry in range A5:F64, I'd like a msgbox to ask for
confirmation, or else undo the change.

So far I can tell if the change is in the desired range (see below), but I
have no clue as to how to undo the changes if not confirmed by the user.
Any ideas would be appreciated.

Thanks, Brian


Private Sub Worksheet_Change(ByVal Target As Range)

Dim WatchRange As Range
Dim ChangedRange As Range

Set WatchRange = Range("A5:F64")
Set ChangedRange = Intersect(Target, WatchRange)

If ChangedRange Is Nothing Then
MsgBox "You changed a cell NOT in the WatchRange", vbOKOnly
Else
MsgBox "You changed a cell in the WatchRange", vbOKOnly
End If

End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNDO - not available Chris T-M Excel Discussion (Misc queries) 3 February 17th 09 01:11 AM
Charts forget range or data; fixed by manual alteration then Undo Garth T Kidd Charts and Charting in Excel 1 February 8th 07 03:23 PM
UNDO - how many times can I UNDO? Jane Excel Worksheet Functions 2 May 19th 05 03:03 AM
Why is my undo function in Excel only can undo the last 1 or 2 ch. 1111111111111111111111111111111111111111 Excel Worksheet Functions 1 November 24th 04 11:13 AM
Undo Please? Jerett Excel Programming 2 December 26th 03 09:33 PM


All times are GMT +1. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"