Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 168
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 63
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ian Ian is offline
external usenet poster
 
Posts: 238
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ian Ian is offline
external usenet poster
 
Posts: 238
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
moving cells with tab button? jjbehler Excel Discussion (Misc queries) 2 May 12th 06 07:30 PM
Moving beteween sheets using the tab button Amir Setting up and Configuration of Excel 1 January 26th 06 11:49 AM
button moving Shawn Excel Discussion (Misc queries) 3 August 30th 05 04:09 PM
print different worksheet by pressing visible button on worksheet Confused Excel Worksheet Functions 2 June 13th 05 02:22 PM
moving mouse highlights cells without touching left mouse button bremboy Excel Discussion (Misc queries) 2 January 27th 05 06:19 PM


All times are GMT +1. The time now is 05:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"