how to move sheets from one workbook to another

V

vicky

I need a vba code to MOVE the COPY of sheets from input.xls To
thisworkbook . "VBA code For Moving The Copy oF sheeets"
 
H

Harald Staff

Sub test()
ActiveSheet.Copy after:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
End Sub

HTH. Best wishes Harald
 
V

vicky

hey thanks ... hey can you give a vba code to delete all the sheets
whose sheet name are not
coloured .......
 
H

Harald Staff

Code like that is really dangerous.
Where is the coloring? Sheet names in colored spreadsheet cells, or colored
sheet tabs?
 
V

vicky

hey i got figure it out thru macro recording. thanks ....
For Each wksSheet In ThisWorkbook.Sheets
If wksSheet.Tab.ColorIndex = -4142 Then
wksSheet.Delete
End If
 
Top