Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add-in sheet copy 1

Status
Not open for further replies.

simoncpage

Programmer
Apr 4, 2002
256
GB
I have an add-in that has a sheet that I wish to copy to a new activesheet can anyone tell me how to do this?
 
Write click on the Sheet name tab, select move or copy and click the copy box. You can also position your sheet here.
 
I want it programmed - so click a button and the sheet in the add-in is copied to the active sheet open....
 
Simon,

Try something like :

Dim x As Integer
x = ThisWorkbook.Sheets.Count
Workbooks("AddIn.xla").Sheets("Sheet1").Copy _
After:=ThisWorkbook.Sheets(x)

where AddIn.xla is the name of your AddIn, and Sheet1 is name of the sheet you want to copy. The code will place the copied sheet at the end of the workbook running the code.

A.C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top