+ Reply to Thread
Results 1 to 2 of 2

copy worksheet

  1. #1
    Registered User
    Join Date
    03-10-2005
    Posts
    46

    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.

  2. #2
    evgny
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1