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


Hi,
if I have some data in an excel spreadsheet and I want to copy certain
fields to another excel file. What function can I use? or how should I
go about doing it? Please let me know. Thanks.


--
owl527
------------------------------------------------------------------------
owl527's Profile: http://www.excelforum.com/member.php...o&userid=20916
View this thread: http://www.excelforum.com/showthread...hreadid=498263

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default copy worksheet

Hi owl527
try this, make nessesery changes.
Sub Makro1()
Dim kolA As Double
' detect the last row, you can change "A"
kolA = Cells(Rows.Count, "A").End(xlUp).Row
Application.ScreenUpdating = False
Workbooks.Open Filename:= _
"C:\Your new workbook.xls"
Workbooks("Your orignal").Activate
Workbooks("Your orignal").Worksheets("from sheet").Range("A1:c" &
kolA).Copy _
Destination:=Workbooks("new
workbook").Worksheets("sheet").Range("a1")

Application.ScreenUpdating = True


End Sub
regards
Yngve

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 Worksheet wont copy objects. Lincoln De Kalb Excel Worksheet Functions 7 January 12th 09 10:30 PM
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Excel Worksheet Functions 2 September 7th 06 05:05 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_2_] Excel Programming 2 September 22nd 04 03:30 PM
copy range on every worksheet (diff names) to a master worksheet (to be created) Bernie[_3_] Excel Programming 0 September 22nd 04 03:26 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM


All times are GMT +1. The time now is 11:26 PM.

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

About Us

"It's about Microsoft Excel"