I have two sheets, in which L6 of Sheet 1 will have a data from a range in sheet 2 B:B. I need a macro, upon a command it shall select B:B, then copy first cell value (B1) to L6
Sub MyMacro()
Static curr As Range
If curr Is Nothing Then Set curr = Worksheets("Sheet2").Range("B1")
If curr.Value = vbNullString Then
MsgBox "No Value"
Exit Sub
End If
' although Select is unrecommneded in VBA, but since it is required in the problem statement...
Worksheets("Sheet2").Activate
curr.Select
Worksheets("Sheet1").Range("L6").Value = curr.Value
Set curr = curr.Offset(1, 0)
End Sub