locked
Using Visual Basic to duplicate an excel worksheet RRS feed

  • Question

  • Hi,

    I'm working on a project which at one point opens an excel file, which is already set up as a template with borders and headers.

    The program fills in the rows with data, but after it has filled in a certain number of rows (say, 40), I want it to move to a new sheet and continue filling in the rows there, which should also be setup with the same appearance as the first.

    Therefore, I need to code it so that it copies the current worksheet (with headers, but before any data is added to it by the program), and puts the copies within the current workbook.

    Right now I can only make it add blank sheets to the workbook, or duplicate the correct sheet but to a new workbook.

    If anyone has any ideas it would be much appreciated.

    Cheers,

    Greg
    Thursday, March 5, 2009 4:57 PM