Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default copy values between workbooks

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy between workbooks Carmela Excel Worksheet Functions 3 January 8th 10 08:24 PM
Copy/ move selected data from workbooks to seperate worksheets or workbooks Positive Excel Worksheet Functions 1 August 30th 07 04:54 PM
copy from different workbooks into one GARDNERGUY Excel Worksheet Functions 0 March 22nd 07 03:48 AM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
compare values between workbooks and copy values bgardiner Excel Programming 0 September 9th 03 03:54 PM


All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"