Floating Drawing Object
CLR wrote:
That is OUTSTANDING Ken..........thanks a HEAP. I had a small problem of it
coming up behind other Drawing Objects but was able to figure out how to
bring it to the front and now life is good. It works perfectly, as you
described, and I really appreciate your help.
Vaya con Dios,
Chuck, CABGx3
Hi Chuck,
However, it is annoying when you want to select a cell that is
underneath Rectange 1, so I have made a version that prevents that
annoyance...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Box As Shape
Set Box = Me.Shapes("Rectangle 1")
If Selection.Left + Selection.Width _
+ Box.Width Rows(1).Width Then
Box.Left = Selection.Left - Box.Width
Else: Box.Left = Selection.Left + Selection.Width
End If
If Selection.Top + Selection.Height _
+ Box.Height Columns(1).Height Then
Box.Top = Selection.Top - Box.Height
Else: Box.Top = Selection.Top + Selection.Height
End If
Box.ZOrder msoBringToFront
End Sub
Ken Johnson
|