- I have two sheets in my excel file,
DTMGIS
andDTMEdit
- the
DTMEdit
sheet is empty - and I am trying to xopy everything from
DTMGIS
and Paste only Values to SheetDTMEdit
I do not know how to select the UsedRange
only and paste this to DMTEdfit
Dim ws As Worksheet
Dim LastRow As Long, LastCoulmn As Long, Header As Long
Header = 2
Set ws = ThisWorkbook.Sheets("DTMGIS")
LastRow = ws.UsedRange.Rows.Count
LastCoulmn = ws.UsedRange.Column.Count
With ws.UsedRange
.Select
.Copy
End With
A variation below which
UsedRange
starts from A1.Copy
useApplication.CutCopyMode = False
at the end)code
Try something like this: