impose a value from workbook A to a cell in workbook B without for

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how can I impose a value from a cell in workbook A to a cell in workbook B
without using a formule in workbook B?

somebody having an idea?
 
If I understand, it doesn't seem possible without a formula or without VBA.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Right click on the sheet tab of the sheet where you will edit the cell.
Select view code and put in code like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If target.Adderss = "$A$1" Then
workbooks("WorkbookB.xls").Range("A1").Value = Target.Value
End if
End Sub

WorkbookB.xls must be open.
 
typo alert <bg>:

Private Sub Worksheet_Change(ByVal Target As Range)
If target.Address = "$A$1" Then
workbooks("WorkbookB.xls").worksheets("sheet1").Range("A1").Value _
= Target.Value
End if
End Sub

(I added worksheets(), too.)

(I wonder if Adderss was one of Peo's Swedish pals? <gd&r>)
 
Good Catch - Thanks!

--
Regards,
Tom Ogilvy

Dave Peterson said:
typo alert <bg>:

Private Sub Worksheet_Change(ByVal Target As Range)
If target.Address = "$A$1" Then
workbooks("WorkbookB.xls").worksheets("sheet1").Range("A1").Value _
= Target.Value
End if
End Sub

(I added worksheets(), too.)

(I wonder if Adderss was one of Peo's Swedish pals? <gd&r>)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top