Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I recorded this macro using Excel's Macro Recorder and making tweaks afterwards. After reading up on VBA I have a feeling that the code is probably bloated with unecessary commands/lines. It also runs fairly slow on my computer. What the macro does is copy a worksheet to a new book, copies that whole sheet and pastes special as values. Then it does a save as and closes... Sub Macro1() Sheets("Invoice").Select Sheets("Invoice").Copy Cells.Select Range("C11").Activate Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False ActiveWorkbook.SaveAs "C:\Documents and Settings\GIT " & Range("G8") & ".xls" ActiveWorkbook.Close End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
More efficient code | Excel Programming | |||
need to make code more efficient (if possible) | Excel Programming | |||
Efficient Code | Excel Programming | |||
More Efficient code than this | Excel Programming | |||
More efficient code | Excel Programming |