Dim sht
With ActiveWorkbook
.Sheets("Sheet1").Copy After:= .Sheets("Sheet2")
Set sht = .Sheets(.Sheets("Sheet2").Index + 1)
End With
More Related Contents:
- excel vba compare & copy worksheets from 2 excel files
- VBA code doesn’t run when cell is changed by a formula
- How to add a named sheet at the end of all Excel sheets?
- Reducing WithEvent declarations and subs with VBA and ActiveX
- How can I loop through a subset of worksheets?
- Excel VBA For Each Worksheet Loop
- Save excel file multiple times with file names in another workbook.
- Function to convert column number to letter?
- Read/Parse text file line by line in VBA
- How do I find the last column with data?
- Excel VBA: Answer gets “stuck”
- Save multiple sheets to .pdf
- filter out multiple criteria using excel vba
- Excel VBA autofilter all but three
- Cells.Find() Raises “Runtime Error 91: Object Variable or With Block Not Set”
- Excel VBA code to copy a specific string to clipboard
- How to import a table from web page (with “div class”) to excel?
- Excel VBA – Range.Copy transpose paste
- Excel tab sheet names vs. Visual Basic sheet names
- How to use FindWindow to find a visible or invisible window with a partial name in VBA
- How do you get a Range to return its Name?
- Refreshing all the pivot tables in my excel workbook with a macro
- Countif With Multiple OR Criteria
- Vlookup to copy color of a cell
- every possible combination of the contents of 2 columns in excel
- How to delete rows in Excel based on criteria using VBA?
- Macro to export MS Word tables to Excel sheets
- VBA WinHTTP to download file from password proteced https website
- Access files with long paths (over 260)
- Concatenate multiple ranges using vba