Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Moving a button on worksheet
Is it possible to make a button "float" so that it's visible at all times
when the user scrolls or uses page down? If not, I could freeze panes but I was just wondering. Thanks. -- Traa Dy Liooar Jock |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Moving a button on worksheet
Hi,
There doesn't seem to be a "Window Scroll" Event so you might be stuck with your current solution. HTH, JP On Nov 2, 6:02 am, Jock wrote: Is it possible to make a button "float" so that it's visible at all times when the user scrolls or uses page down? If not, I could freeze panes but I was just wondering. Thanks. -- Traa Dy Liooar Jock |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Moving a button on worksheet
Hello
instead of a button, you could assign a key shortcut to the macro... "Jock" schreef in bericht ... Is it possible to make a button "float" so that it's visible at all times when the user scrolls or uses page down? If not, I could freeze panes but I was just wondering. Thanks. -- Traa Dy Liooar Jock |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Moving a button on worksheet
Fair enough. Thanks for the reply tho.
-- Traa Dy Liooar Jock "JP" wrote: Hi, There doesn't seem to be a "Window Scroll" Event so you might be stuck with your current solution. HTH, JP On Nov 2, 6:02 am, Jock wrote: Is it possible to make a button "float" so that it's visible at all times when the user scrolls or uses page down? If not, I could freeze panes but I was just wondering. Thanks. -- Traa Dy Liooar Jock |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Moving a button on worksheet
It's not possible in the way you are thinking (ie it always stays in the
same relative position in the window), but you can make it stay in the same position relative to the active cell. This is a button from the Control toolbox, not Forms. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If ActiveCell.Row 65530 Or ActiveCell.Column 252 Then CommandButton1.Top = ActiveCell.Offset(-3, 0).Top CommandButton1.Left = ActiveCell.Offset(0, -3).Left Else CommandButton1.Top = ActiveCell.Offset(1, 0).Top CommandButton1.Left = ActiveCell.Offset(0, 1).Left End If End Sub This normally positions the top left corner of the button with the bottom left corner of the active cell. If the active cell is row 65530 or greater, or column IR or beyond, the button repositions to 3 cells up and 3 cells left of the active cell to avoid the button resizing when it reaches the edge/bottom of the sheet, and to avoid an error in the code when in the last row or column. The drawback with this is that when the active cell is either the bottom visible row or the rightmost visible column, the button will be outside the visible area. -- Ian -- "Jock" wrote in message ... Is it possible to make a button "float" so that it's visible at all times when the user scrolls or uses page down? If not, I could freeze panes but I was just wondering. Thanks. -- Traa Dy Liooar Jock |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Moving a button on worksheet
instead of a button, you could assign a key shortcut to the macro...
Or assign the macro to a toolbar button Ian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
moving cells with tab button? | Excel Discussion (Misc queries) | |||
Moving beteween sheets using the tab button | Setting up and Configuration of Excel | |||
button moving | Excel Discussion (Misc queries) | |||
print different worksheet by pressing visible button on worksheet | Excel Worksheet Functions | |||
moving mouse highlights cells without touching left mouse button | Excel Discussion (Misc queries) |