Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cleaning up code
Hi I recorded a copy/paste special as values macro but am sure there is a more elegant way of writing the code. what part of the code below is not necessary? Sheets("Market").Select Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Range("A1").Select Thanks Kevin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cleaning up code
I missed the paste special..Try the below Sub Macro2() Sheets("Market").UsedRange = Sheets("Market").UsedRange.Value End Sub If this post helps click Yes --------------- Jacob Skaria "kevin" wrote: Hi I recorded a copy/paste special as values macro but am sure there is a more elegant way of writing the code. what part of the code below is not necessary? Sheets("Market").Select Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Range("A1").Select Thanks Kevin |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cleaning up code
Using PasteSpecial.
With Sheets("Market") .Cells.Copy .Range("A1").PasteSpecial xlPasteValues End With On Jun 22, 6:22*pm, kevin wrote: Hi I recorded a copy/paste special as values macro but am sure there is a more elegant way of writing the code. what part of the code below is not necessary? Sheets("Market").Select * * Cells.Select * * Selection.Copy * * Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ * * * * :=False, Transpose:=False * * Application.CutCopyMode = False * * Range("A1").Select Thanks Kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cleaning up code | Excel Programming | |||
Cleaning up code | Excel Programming | |||
Cleaning up some code? | Excel Programming | |||
Help Cleaning up Code | Excel Programming | |||
Need help Cleaning up Code | Excel Programming |