Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select a sheet to copy from one workbook to another
Hi everyone,
my problem is that I have to import ( copy) a sheet from another exce file into the one I'm in right now (the one with my VBA code etc...) copy it is OK but what i want to do is when the other workbook opens, want the person who'll be using this program to be able to select th sheet she wants to copy (because the compagny who supplys us the secon file in which we go get the sheet, never places it at the same plac AND there are 2 sheets almost identical... one of them being the one want ). So in simple, when the second workbook opens, would it be possible fo the user to go click on the worksheet she wants, or anything similar t that ...? here is what i've got for now but it presumes that the sheet is alway in the second position. Sub ImporterFeuilleQSS() Dim fichierQSS Dim wkbk1 As Workbook Dim wkbk2 As Workbook Dim Wks As Worksheet Application.ScreenUpdating = False fichierQSS = Application.GetOpenFilename("Feuilles Excels (*.xls) *.xls") If fichierQSS < "Faux" Then Application.Workbooks.Open (fichierQSS) Else Application.ScreenUpdating = True Exit Sub End If Set wkbk1 = Workbooks(2) Set wkbk2 = Workbooks("Conversion en Ascii.xls") wkbk1.Worksheets(2).Cop after:=wkbk2.Worksheets(wkbk2.Worksheets.Count) Set Wks = ActiveSheet Wks.Name = "Commande QTT" Cells.EntireColumn.Hidden = False Workbooks(2).Close (False) Application.ScreenUpdating = True End Sub Thanks for anyone trying ...anything :p Holysoul -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select a sheet to copy from one workbook to another
could be good, but how do i pause my code so that i can go select whic
sheet i want and then make it resume to take the activesheet (beein the one I selected) Find this, and you'll be my new God! Holysou -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I CAN'T SELECT THE CELLS IN A WORKBOOK I WANT TO COPY | Excel Discussion (Misc queries) | |||
select a range, copy it to a new sheet | Excel Discussion (Misc queries) | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
Use Sheet CodeNames to Select Sheet in Different Workbook | Excel Discussion (Misc queries) | |||
Copy select sheets to another Workbook | Excel Programming |