View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Transferring of certain cells from one workbk to another

Hi

Inset the code below in the codesheet for sheet1 of workbook A. (Rightclick
on the sheet tab and select View code, and paste the code in the sheet which
appears)

The range to copy and the destination can be changed as desired.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim wbA As Workbook
Dim wbB As Workbook

Set wbA = ThisWorkbook
Set wbB = Workbooks("Book2.xls") 'change to desired name

If Target.Address = "$A$1" Then
If Target.Value = "Click" Then
Range("B2:H4").Copy wbB.Sheets("Sheet1").Range("A1")
End If
End If
End Sub

Hopes it helps.

Regars,
Per

"amelia" skrev i meddelelsen
...
I have this scenario: On cell A1 of workbook A, when the text "Click" is
selected, certain cell from this workbook will be transferred to workbook
B.
Is there any possible program that allows this scenario to function?

Ive been trying to troubleshoot the above but cant seem to get it started.
Can anybody help please?