Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to create a macro that copies the cell range from one workbook to another
I have two workbooks, namely Book1 and Book2, When I open Book2, It must copy the cell range e.g A1:B10 from Book1 and place them in the same range. try this in ThisWorkbook from Book2: Private Sub Workbook_Open() Dim wbk As Workbook ' examine whether Book1 is open On Error Resume Next Set wbk = Workbooks("Book1") If Err Then Exit Sub Me.Worksheets("Sheet1").Range("A1:B10").Value = _ wbk.Worksheets("Sheet1").Range("A1:B10").Value End Sub -- Regards Melanie Breden - Microsoft MVP für Excel - http://excel.codebooks.de (Das Excel-VBA Codebook) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for copying ? | Excel Discussion (Misc queries) | |||
copying using a macro | Excel Worksheet Functions | |||
Macro for Copying | Excel Worksheet Functions | |||
creating macro for copying the value from one cell | New Users to Excel | |||
Copying a cell to another cell using a macro | Excel Programming |