CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    asian
    Posts
    116

    copy and insert row from excel

    Can anyone tell me how to copy number of rows from an excel worksheet and insert those rows on another worksheet using VB?

    I know this i possible but i dont know how. Can anyone help me?

    Thanks,
    kristine
    Thanks!!!
    Kristine

  2. #2
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569
    you do something like:

    Sheets("Sheet1").Select
    Range("8:8,11:11,14:14").Select
    Selection.Copy
    Sheets("Sheet2").Select
    Rows("10:10").Select
    ActiveSheet.Paste
    Mike

  3. #3
    Join Date
    Jun 2003
    Location
    Reno,NV
    Posts
    29
    When I want to do a common excel function in vba, but don't know how to do it, I will create a macro for what I want done, then look at the code generated by the macro. Most of the time I will paste the macro code directly into my own routines. This method has probably taught me more about VBA than anything else.

    kevin

  4. #4
    Join Date
    Oct 2002
    Location
    asian
    Posts
    116
    Thanks a lot guys!!! you gave me an idea.
    Thanks!!!
    Kristine

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured