Author Archives: tabcom

Excel VBA example

 'Select cells and copy
 Range("I2:L14").Select
 Selection.Copy
 
 'Create new sheet and rename
 Sheets.Add After:=ActiveSheet
 ActiveSheet.Name = Format(Now(), "dd-MM-yy hh-mm-ss")
 
 'Paste
 Selection.PasteSpecial Paste:=xlPasteAll
 Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
 Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
 
 'Cleanup
 Sheets(1).Select
 
 Range("E1").ClearContents
 Range("B4:B5").ClearContents

 Range("A1").Select
Excel VBA example was last modified: July 25th, 2018 by tabcom