Function CodeRangeInVBA(TheRange As Range) As String
Dim Result As String
Dim Cr As Range
For Each Cr In TheRange
If Result <> "" Then Result = Result & Chr(10)
Result = Result & "Range(" & Chr(34) & Cr.AddressLocal & Chr(34) & ").Value = " & Chr(34) & CStr(Cr.Value) & Chr(34)
Next Cr
CodeRangeInVBA = Result
End Function
No comments:
Post a Comment