Click here to Skip to main content
11,925,896 members (61,298 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
This I think is a simple solution. Just that I have spent too long trying to do it.

I have a worksheet named, "SheetA" and have headings from A1....D1 e.g. forename, surname, department, age

I want to copy and paste this line into my other worksheet "SheetB" at the same place.

How is this done?
Posted 8-Apr-13 7:31am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Maciej Los 8-Apr-13 14:11pm
This is for VBA, not for VB.NET ;(
Kenneth Haugland 8-Apr-13 14:52pm
I know, that is true, but they are easily converted. :-)
Maciej Los 8-Apr-13 14:57pm
I know, i expected that you reply me this way ;)
Kenneth Haugland 8-Apr-13 15:12pm
Google is rather predictable, I know :laugh:
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Using late binding Wink | ;)
Dim oExc As Object = Nothing, oWbk As Object = Nothing
Dim oSrcWsh As Object = Nothing, oDstWsh As Object = Nothing
    oExc = CreateObject("Excel.Applictaion")
    oWbk = oExc.Workbooks.Open("FullPathToWorkbook.xls")
    oSrcWsh = oWbk.WorkSheets("Sheet1")
    oDstWsh = oWbk.WorkSheets("Sheet2")
Catch ex As Exception
    oSrcWsh = Nothing
    oDstWsh = Nothing
    oWbk = Nothing
    oExc = Nothing
End Try

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 8 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100