Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I´m new to this programming thing! I´m trying to copy values from one workbook to another. The workbooks are identic to eachother exept for the values in some sheets and certain rows, se below. All the other cells are containing formulas and are protected by password.(It´s the formulas I sometimes need to change, so this will just be a "upgrade" of the workbook. The thing is that the workbooks containing aproximatly 150 sheets, and it´s only 50 of them thats really are concerned by this need of copy the values. Can I loop them anyway? My wish is to have a button in the new workbook, click that and you start a macro that opens the "old" workbook(Sch20041H), and copy the values from the old wbook, and paste them into the "new" one, as I´ve describe. I´ve tryed to do it by the code as below, but I get errors(naturally). Thanks for your help! //Thomas Sub Sch2000copytonew() ' ' Sch2000copytonew Macro ' Macro recorded 1/28/2004 by Thomas ' For Each ws In Worksheets ws.Activate Cells(Rows.Count, "B:D", "K:M", "T:V", "AC:AE", "AL:AN", "AU:AW", "BD:BF").End(xlUp)(2).Select Selection.Copy Windows("Sch20041H.xls").Activate For Each ws In Worksheets ws.Activate Cells(Rows.Count, "B:D", "K:M", "T:V", "AC:AE", "AL:AN", "AU:AW", "BD:BF").End(xlUp)(2).Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False Sheets("Meny").Select Range("B6").Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy between workbooks | Excel Worksheet Functions | |||
Copy/ move selected data from workbooks to seperate worksheets or workbooks | Excel Worksheet Functions | |||
copy from different workbooks into one | Excel Worksheet Functions | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
compare values between workbooks and copy values | Excel Programming |