jrice174
Civil/Environmental
- Nov 8, 2004
- 129
In a VBA program when I have the user select an area on the screen, I call the GetUserPoint twice (to get both points) and then call the SelectByPoints sub. Doing this, the user does not have rubber banding as they move the mouse from their first selection point to the second. It seems as if it's not working for the user if they don't see the familar rubber banding. How do I get the rubber banding outline to show up? My code is shown below.
Public Sub GetUserPoint()
PointPicked = True
With ThisDrawing.Utility
On Error GoTo NoInput
varPick = .GetPoint(, vbCr & "Pick a point: ")
.Prompt vbCr & varPick(0) & "," & varPick(1)
On Error GoTo NoInput
End With
Exit Sub
NoInput:
PointPicked = False
End Sub
and
Public Sub SelectByPoints()
On Error Resume Next
ThisDrawing.SelectionSets("TEMP").Delete
Set objSS = ThisDrawing.SelectionSets.Add("TEMP")
''''objSS.Select 1, Pt1, Pt2, intCodes, varCodeValues ' 5 = all, 1 = use Pt1 and Pt2
objSS.Select 1, Pt1, Pt2
End Sub
Public Sub GetUserPoint()
PointPicked = True
With ThisDrawing.Utility
On Error GoTo NoInput
varPick = .GetPoint(, vbCr & "Pick a point: ")
.Prompt vbCr & varPick(0) & "," & varPick(1)
On Error GoTo NoInput
End With
Exit Sub
NoInput:
PointPicked = False
End Sub
and
Public Sub SelectByPoints()
On Error Resume Next
ThisDrawing.SelectionSets("TEMP").Delete
Set objSS = ThisDrawing.SelectionSets.Add("TEMP")
''''objSS.Select 1, Pt1, Pt2, intCodes, varCodeValues ' 5 = all, 1 = use Pt1 and Pt2
objSS.Select 1, Pt1, Pt2
End Sub