ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copying worksheet (https://www.excelbanter.com/excel-programming/355249-re-copying-worksheet.html)

engnouna

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?


--
engnouna
------------------------------------------------------------------------
engnouna's Profile: http://www.excelforum.com/member.php...o&userid=32203
View this thread: http://www.excelforum.com/showthread...hreadid=519505


Tom Ogilvy

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" wrote in
message ...

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





All times are GMT +1. The time now is 06:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com