+ Reply to Thread
Results 1 to 3 of 3

VBA application::copying worksheet

  1. #1
    Registered User
    Join Date
    03-06-2006
    Posts
    2

    VBA application::copying worksheet

    Hi
    I want to build a VBA application:
    I have an excel workbook containing 7 blank worksheet.In my VBA form,I want to enter 7 names of worksheets(not belonging to my workbook),the worksheet corresponding to the first entered worksheet name should be copied to my blank workbook(sheet1),the second entered worksheet name should be copied to my blank workbook(sheet2)...
    how can i do it?

  2. #2
    Tom Ogilvy
    Guest

    re: VBA application::copying worksheet

    Dim v as Variant
    With Userform1
    v = Array(.Textbox1.text, .textbox2.text, . . .,.textbox7.text)
    End With
    With thisworkbook
    workbooks("OtherWorkbook.xls").Worksheets(v).Copy _
    After:=.Worksheets(.worksheets.count)
    End With

    --
    Regards,
    Tom Ogilvy

    "engnouna" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    > I want to build a VBA application:
    > I have an excel workbook containing 7 blank worksheet.In my VBA form,I
    > want to enter 7 names of worksheets(not belonging to my workbook),the
    > worksheet corresponding to the first entered worksheet name should be
    > copied to my blank workbook(sheet1),the second entered worksheet name
    > should be copied to my blank workbook(sheet2)...
    > how can i do it?
    >
    >
    > --
    > engnouna
    > ------------------------------------------------------------------------
    > engnouna's Profile:

    http://www.excelforum.com/member.php...o&userid=32203
    > View this thread: http://www.excelforum.com/showthread...hreadid=519505
    >




  3. #3
    Tom Ogilvy
    Guest

    re: VBA application::copying worksheet

    Dim v as Variant
    With Userform1
    v = Array(.Textbox1.text, .textbox2.text, . . .,.textbox7.text)
    End With
    With thisworkbook
    workbooks("OtherWorkbook.xls").Worksheets(v).Copy _
    After:=.Worksheets(.worksheets.count)
    End With

    --
    Regards,
    Tom Ogilvy

    "engnouna" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    > I want to build a VBA application:
    > I have an excel workbook containing 7 blank worksheet.In my VBA form,I
    > want to enter 7 names of worksheets(not belonging to my workbook),the
    > worksheet corresponding to the first entered worksheet name should be
    > copied to my blank workbook(sheet1),the second entered worksheet name
    > should be copied to my blank workbook(sheet2)...
    > how can i do it?
    >
    >
    > --
    > engnouna
    > ------------------------------------------------------------------------
    > engnouna's Profile:

    http://www.excelforum.com/member.php...o&userid=32203
    > View this thread: http://www.excelforum.com/showthread...hreadid=519505
    >




+ 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