Results 1 to 44 of 44

Excel VBA: Problem with porting selected data from one excel workbook to another

Threaded View

hahas018 Excel VBA: Problem with... 07-22-2013, 09:13 AM
Solus Rankin Re: Excel VBA: Problem with... 07-22-2013, 09:36 AM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 12:18 PM
Solus Rankin Re: Excel VBA: Problem with... 07-22-2013, 12:32 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 12:41 PM
Solus Rankin Re: Excel VBA: Problem with... 07-22-2013, 12:43 PM
Norie Why are you creating a new... 07-22-2013, 12:53 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 01:24 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 01:18 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 01:32 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 01:36 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 01:39 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 02:23 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 02:32 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 02:52 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 03:39 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 09:40 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 10:16 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 10:26 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 10:35 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 10:39 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 10:43 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 10:54 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 11:00 PM
hahas018 Re: Excel VBA: Problem with... 07-22-2013, 11:17 PM
Norie Re: Excel VBA: Problem with... 07-22-2013, 11:25 PM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 12:35 AM
Norie Re: Excel VBA: Problem with... 07-23-2013, 12:43 AM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 01:10 AM
Norie Re: Excel VBA: Problem with... 07-23-2013, 01:14 AM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 01:24 AM
Norie Re: Excel VBA: Problem with... 07-23-2013, 01:33 AM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 01:57 AM
Norie Re: Excel VBA: Problem with... 07-23-2013, 02:13 AM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 09:09 AM
Norie Re: Excel VBA: Problem with... 07-23-2013, 09:17 AM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 09:28 AM
Norie Re: Excel VBA: Problem with... 07-23-2013, 09:34 AM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 09:46 AM
Norie Re: Excel VBA: Problem with... 07-23-2013, 09:58 AM
hahas018 Re: Excel VBA: Problem with... 07-23-2013, 12:56 PM
hahas018 Re: Excel VBA: Problem with... 08-19-2013, 05:43 AM
hahas018 Re: Excel VBA: Problem with... 08-19-2013, 05:47 AM
hahas018 Re: Excel VBA: Problem with... 08-19-2013, 05:46 AM
  1. #1
    Registered User
    Join Date
    07-22-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    32

    Excel VBA: Problem with porting selected data from one excel workbook to another

    Hi guys,

    I have an issue regarding porting data from one excel workbook to another workbook.

    I want to select specific data from a specific sheet in an excel file and copy it into a new excel file.

    ScreenShot005.jpg
    e.g. copy C4 of excel1.xlsx into a new excel file excel2.xlsx



    I've tried the following codes and links but to no avail:

    Codes:

    Private Sub CommandButton1_Click()
    Dim oExcel as Excel.Application
    Dim oWB as Workbook
    Set oExcel = new Excel.Application
    Set oWB = oExcel.Workbooks.Open(C:\Users\Sam\Desktop\MP Stuff\TP Monthly Report v0.xlsx)
    
    
    Dim DateRange As Integer
    Dim AcceptedCalls As Single
    Dim PortedData As Workbook
    
    Worksheets("sheet2").Select
    'DateRange = Range("A4")
    
    'DateRange = Range("B4" + "B27")
    DateRange = Sum(B4, B27)
    
    Set PortedData = Workbooks.Open("C:\Users\Sam\Desktop\MP Stuff\PortedData.xlsx")
    Worksheets("sheet1").Select
    Worksheets("sheet1").Range("A1").Select
    RowCount = Worksheets("sheet1").Range("A1")
    With Worksheets("Sheet1").Range("A1")
    .Offset(RowCount, 0) = DateRange
    .Offset(RowCount, 1) = AcceptedCalls
    
    End With
    PortedData.Save
    End Sub
    ---------------------------


    Links:
    http://en.kioskea.net/faq/24666-exce...other-workbook
    http://www.familycomputerclub.com/tr...excel-vba.html


    Thanks in advance!
    Last edited by arlu1201; 07-22-2013 at 09:36 AM. Reason: Use code tags in future.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Searching and porting data using a date range and Item ID
    By Aussie1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-01-2013, 01:36 PM
  2. Transfer selected data to another workbook...Excel 2003
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2012, 07:49 AM
  3. Porting VBA to Excel 2010 for 64-bit
    By 6StringJazzer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2012, 10:51 PM
  4. programatically retrieve selected rows from excel workbook
    By talktobatchu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-01-2005, 06:05 PM
  5. Porting of Excel data to SQL Server 2000 remotely
    By Luke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2005, 03:06 AM

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