Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default undoing a VB action

I have the attached code to sheet! Basically it gives me the user name and
date when a value is altered. What I want to do is for the user to be able
to undo the changes they make.

Any ideas?

Thanks in advance!

Rich :o)


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column < 15 Then Exit Sub
If Target.Row = 1 Then Exit Sub
If IsEmpty(Target.Offset(0, 9)) Then
Target.Offset(0, 10) = Date
Target.Offset(0, 9) = Application.UserName
End If
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default undoing a VB action

You would need to build your own record of what the sheet was like before
the user started making changes, then provide a means for them to select to
undo - then replace the changes with the original.

Most macros, when run, cause the undo history to be erased and undo does not
record changes made by a macro.

--
Regards,
Tom Ogilvy

"RICH" wrote in message
...
I have the attached code to sheet! Basically it gives me the user name

and
date when a value is altered. What I want to do is for the user to be

able
to undo the changes they make.

Any ideas?

Thanks in advance!

Rich :o)


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column < 15 Then Exit Sub
If Target.Row = 1 Then Exit Sub
If IsEmpty(Target.Offset(0, 9)) Then
Target.Offset(0, 10) = Date
Target.Offset(0, 9) = Application.UserName
End If
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default undoing a VB action

Yep agree with what you're saying. The only prob is to do that the file has
to be saved externally. It's a 2MB file so saving is an issue.

Looks like there isn't an alternative!

Thanks anyway!

Rich :o)


"Tom Ogilvy" wrote in message
...
You would need to build your own record of what the sheet was like before
the user started making changes, then provide a means for them to select

to
undo - then replace the changes with the original.

Most macros, when run, cause the undo history to be erased and undo does

not
record changes made by a macro.

--
Regards,
Tom Ogilvy

"RICH" wrote in message
...
I have the attached code to sheet! Basically it gives me the user name

and
date when a value is altered. What I want to do is for the user to be

able
to undo the changes they make.

Any ideas?

Thanks in advance!

Rich :o)


Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column < 15 Then Exit Sub
If Target.Row = 1 Then Exit Sub
If IsEmpty(Target.Offset(0, 9)) Then
Target.Offset(0, 10) = Date
Target.Offset(0, 9) = Application.UserName
End If
End Sub






Reply
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
Excell copy action pauses for 15 second for the smallest action Meekal Excel Discussion (Misc queries) 1 January 28th 10 04:30 PM
Allow no action to be taken Smitty[_2_] Excel Worksheet Functions 4 January 23rd 08 10:52 PM
Undoing formula phil2006 Excel Discussion (Misc queries) 1 July 13th 06 11:33 AM
undoing conditional formatting lil'bit Excel Discussion (Misc queries) 3 November 10th 05 08:55 PM
Undoing LINKS in Excel 2000 jayceejay New Users to Excel 3 January 4th 05 05:58 PM


All times are GMT +1. The time now is 05:31 AM.

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

About Us

"It's about Microsoft Excel"