Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default View previous cell value programmically


Thanks for the reply.

I'm curious - how does Excel 'undo' cell values then?

Thanks

--
stratagur
-----------------------------------------------------------------------
strataguru's Profile: http://www.excelforum.com/member.php...nfo&userid=131
View this thread: http://www.excelforum.com/showthread.php?threadid=26291

  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default View previous cell value programmically

hi again,
ctrl+x is all i know. i never had a reason to do it
programaticly so i never looked into it. interesting
thought though.

-----Original Message-----

Thanks for the reply.

I'm curious - how does Excel 'undo' cell values then?

Thanks!


--
strataguru
----------------------------------------------------------

--------------
strataguru's Profile:

http://www.excelforum.com/member.php?
action=getinfo&userid=1313
View this thread:

http://www.excelforum.com/showthread...hreadid=262910

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default View previous cell value programmically

Like this

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim v as Variant
Dim vOld as Variant
if target.count 1 then exit sub
if Target.Column = 6 then
v = Target.Value
On Error goto ErrHandler
Application.EnableEvents = False
application.Undo
vOld = Target.Value
Target.Value = v
msgbox "New: " & v & vbNewline & _
"Old: " & vOld
End If
ErrHandler:
Application.EnableEvents = True
End Sub

--
Regards,
Tom Ogilvy

"strataguru" wrote in message
...

Thanks for the reply.

I'm curious - how does Excel 'undo' cell values then?

Thanks!


--
strataguru
------------------------------------------------------------------------
strataguru's Profile:

http://www.excelforum.com/member.php...fo&userid=1313
View this thread: http://www.excelforum.com/showthread...hreadid=262910



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
3-Color Scale Vlookup for Current Month/Previous/Pre-Previous NeoFax Excel Discussion (Misc queries) 2 January 8th 10 07:04 PM
Creating Variables Programmically Brite Excel Discussion (Misc queries) 5 April 23rd 07 10:34 AM
View previous cell value programmically strataguru[_16_] Excel Programming 2 September 23rd 04 06:52 PM
Edit Data Query Programmically? Squid[_2_] Excel Programming 5 May 27th 04 10:13 PM
How do I change a function's otional parameter default values programmically Michael[_21_] Excel Programming 5 October 24th 03 09:22 PM


All times are GMT +1. The time now is 04:36 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"