View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Simon Lloyd[_275_] Simon Lloyd[_275_] is offline
external usenet poster
 
Posts: 1
Default copy value from active sheet to another workbook


sak;387066 Wrote:
on close of an active sheet how do i copy a value to another workbook
(already open) in a specific cellIf you truly are deactivating a worksheet (i.e by moving to another

sheet) then right click the tab of that sheet, choose view code and
paste this in, don't forget to change the name of the destination
workbook and destination sheet and range:


Code:
--------------------
Private Sub Worksheet_Deactivate()
Me.Range("A1").Copy Destination:=Workbooks("Book2").Sheets("Sheet1").R ange("A1")
End Sub
--------------------


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=108236