this may be very simple but I am not able to work around it.
I could free up the column from where I am copying data by using Application.CutCopyMode=False
but the column where data is pasted is still remain selected, I tried ActiveSheet.EnableSelection = xlNone
as suggested in one of the forum without any success rest of my code working fine:
Dim wb As Workbook
Dim t1 As Worksheet
Dim r As Worksheet
Set wb = ActiveWorkbook
Set t1 = Sheets("dataT1")
Set r = Sheets("HPV1report")
t1.Range("D3:CR5").Copy
r.Range("A2").PasteSpecial _
Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=True
Selection.EntireColumn.AutoFit
End sub
Other thing I can think of is selecting Cell A1 so the column will get free but I will prefer to use select if i can.
You can not really un-select a cell, because it is in the nature of a worksheet that there is always a selected cell.
The only reason why there might be no selected cell is
So the correct way to go is, as you already found out:
Select any other cell, eg. A1.