Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks all for your help. I'm focusing in on the commandbar object.
tt On Wed, 31 Dec 2003 10:51:29 -0600, "Dianne" wrote: The best I could come up with is to put the code into the worksheet's SelectionChange event: Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Dim btn As OLEObject Dim rng As Range Set rng = Windows(1).Panes(1).VisibleRange.Cells(1, 1) Set btn = ActiveSheet.OLEObjects("CommandButton1") btn.Top = rng.Top + 20 btn.Left = rng.Left + 20 Set rng = Nothing Set btn = Nothing End Sub This won't reposition on scrolling, but when the user clicks into the newly visible area, the button will reappear. Kinda clunky. Also, this doesn't work if you've frozen panes. Your best bet might be, as Rob says, a commandbar object. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for floating button | Excel Discussion (Misc queries) | |||
floating button | Excel Discussion (Misc queries) | |||
Floating button | New Users to Excel | |||
Floating command button | Excel Discussion (Misc queries) | |||
Command Button vs Form Button | Excel Programming |