Link to home
Start Free TrialLog in
Avatar of loay
loay

asked on

need help in Excel

hi there
plz help me in this peoblem
how can i connect two bockes together in the excel example:
i want every thing i am writing in a book happend to another one

send to me as soon as you can

Avatar of jcummings
jcummings

The easiest and quickest way to do this is to do the work in one book and then copy it to another when you are done.
There ia a way to make a cell in one reference a cell in another book. I'm sorry I can't tell you exactly how.

found it follow these steps
1,copy cells you want
2.go to new sheet
3.edit-paste special
4.paste link at bottom right of panel
Avatar of loay

ASKER

I want to do this using macros, not by copy and paste, So can you help me,
for that I reject the answer you send..
Your's
Loay jaber
Hi Loay,

Supposing your soruce workbook  is called "Book1.xls" and copy workbook is called "Book2.xls" & both are opened as blank workbooks, put this code in the Workbook_SheetChange event of "Book1.xls"

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Workbooks("Book2.xls").Sheets(ActiveSheet.Name).Range(Target.Address) = Target
End Sub

To get there, right-click on the Excel-symbol left next to 'File' in the menu bar, and select view code, then paste the above lines. Close the Visual Basic Editor afterwards, to save your changes.

What will happen now, is that every text you type in "Book1.xls" will be copied automatically in "Book2.xls"

Hope this is what you want,

Calacuccia
ASKER CERTIFIED SOLUTION
Avatar of calacuccia
calacuccia
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of loay

ASKER

hi calacuccia
but your answer didnt work because when i try it it give me "over flow " and there are nothing happen