Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well Duh! Brain fart. Thanks so much.
John "Joel" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell vlue based on cell back colour | Excel Worksheet Functions | |||
Hyperlink from one.xlsx cell to another two.xlxs cell & click back | Excel Worksheet Functions | |||
copy-paste started misbehaving (cell reference wrong) | Excel Discussion (Misc queries) | |||
How do I. VLOOKUP & BRING BACK THE CELL BELOW THE CELL WHICH IS FO | Excel Worksheet Functions | |||
Change an empty cell back to a blank cell ... | Excel Programming |