Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All.........
If someone would be so kind.....I'm trying to find out how to make a Drawing Object, (specifically "Rectangle 1") float on the screen like some of the annoying pop-ups do, so it will always be on-screen as the user scrolls up and down the sheet. I know about the Freeze line, but don't want that in this case. TIA Vaya con Dios, Chuck, CABGx3 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
AFAIK you can't do that with a shape, but you can with Modeless Userform.
Then put whatever you want on the userform. NickHK "CLR" wrote in message ... Hi All......... If someone would be so kind.....I'm trying to find out how to make a Drawing Object, (specifically "Rectangle 1") float on the screen like some of the annoying pop-ups do, so it will always be on-screen as the user scrolls up and down the sheet. I know about the Freeze line, but don't want that in this case. TIA Vaya con Dios, Chuck, CABGx3 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks NickHK..........
I'm not familiar with those yet......I'll have to do some research. Thanks for the tip. Vaya con Dios, Chuck, CABGx3 "NickHK" wrote: AFAIK you can't do that with a shape, but you can with Modeless Userform. Then put whatever you want on the userform. NickHK "CLR" wrote in message ... Hi All......... If someone would be so kind.....I'm trying to find out how to make a Drawing Object, (specifically "Rectangle 1") float on the screen like some of the annoying pop-ups do, so it will always be on-screen as the user scrolls up and down the sheet. I know about the Freeze line, but don't want that in this case. TIA Vaya con Dios, Chuck, CABGx3 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
CLR wrote:
Hi All......... If someone would be so kind.....I'm trying to find out how to make a Drawing Object, (specifically "Rectangle 1") float on the screen like some of the annoying pop-ups do, so it will always be on-screen as the user scrolls up and down the sheet. I know about the Freeze line, but don't want that in this case. TIA Vaya con Dios, Chuck, CABGx3 Hi Chuck, This it pretty rough and probably just for a laugh... Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Me.Shapes("Rectangle 1") ..Top = ActiveWindow.VisibleRange.Top + 100 ..Left = ActiveWindow.VisibleRange.Left + 100 End With End Sub When the user scrolls the rectangle out of view it does move out of view. However, If the visible range is clicked then the rectangle reappears 100 points from the top and left side. Ken Johnson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Ken Johnson" wrote: CLR wrote: Hi All......... If someone would be so kind.....I'm trying to find out how to make a Drawing Object, (specifically "Rectangle 1") float on the screen like some of the annoying pop-ups do, so it will always be on-screen as the user scrolls up and down the sheet. I know about the Freeze line, but don't want that in this case. TIA Vaya con Dios, Chuck, CABGx3 Hi Chuck, This it pretty rough and probably just for a laugh... Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Me.Shapes("Rectangle 1") ..Top = ActiveWindow.VisibleRange.Top + 100 ..Left = ActiveWindow.VisibleRange.Left + 100 End With End Sub When the user scrolls the rectangle out of view it does move out of view. However, If the visible range is clicked then the rectangle reappears 100 points from the top and left side. Ken Johnson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
YES SIR!!!!!.........that is really really cool........thanks many bunches
Ken, you are a Prince of Programmers. Vaya con Dios, Chuck, CABGx3 "Ken Johnson" wrote: 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 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Chuck, Glad you like it. Thanks for those kind words, I'll pass them on to my superiors;-) Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Floating Object | Excel Discussion (Misc queries) | |||
Floating object? | New Users to Excel | |||
Drawing Object in a Userform | Excel Programming | |||
Drawing Object | Excel Programming | |||
Drawing object references | Excel Programming |