Go back to the cell that I started from
You just needed to use the set command. Don't declare strplace as a string.
Sub test()
Set strPlace = ActiveCell
Do While Selection.Value = "not tired"
Range("B100").Select
Loop
MsgBox strPlace
strPlace.Select
End Sub
"John Shelton" wrote:
If user selects D20 as the starting point and moves everywhere on the same
worksheet, how can i go back to where I started at. The following is what I
did but the Range(strPlace).Select returns an error. MsgBox returns 4,20
(D20) for example
Dim strPlaceRow, strPlaceColumn, strPlace As String
strPlaceColumn = ActiveCell.Column
strPlaceRow = ActiveCell.Row
strPlace = strPlaceColumn & "," & strPlaceRow
Do While Selection.Value = "not tired"
Loop
MsgBox strPlace
Range(strPlace).Select
Thanks for the help
John
|