Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Command button position and screen resolution

I have a worksheet that has four command buttons to run macros. If it is
used on a computer with a different screen resolution the buttons are in a
different position. Is there a way of anchoring the buttons to a point on
the worksheet so that they are in the same position, relarive to the cells,
no matter what the resolution?
Thanks in advance for your help.

Regards
Peter
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Command button position and screen resolution


Palpha32;256211 Wrote:
I have a worksheet that has four command buttons to run macros. If it
is
used on a computer with a different screen resolution the buttons are
in a
different position. Is there a way of anchoring the buttons to a point
on
the worksheet so that they are in the same position, relarive to the
cells,
no matter what the resolution?
Thanks in advance for your help.

Regards
Peter


Hello Peter,

If the command buttons are from the Control Toolbox then you can the
following:

1. Right Click the command Button.
2. Select Format Control...
3. Select the Properties tab
4. Click the check box marked Move and size with cells


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=71514

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Command button position and screen resolution

I think this workbook event code might do what you want (change the cell
assignment to the cell you actually want to "attach" to)...

Private Sub Workbook_Open()
Dim R As Range
Set R = Range("D4")
With ActiveSheet.CommandButton1
.Left = R.Left + R.Width
.Top = R.Top
End With
End Sub

To implement it, right click the XL icon to the left of the File menu item
and select View Code from the popup menu that appears and copy/paste the
above code into the code window that appeared. Now, whenever the workbook is
opened (and macros are enabled), the button will move into position next to
the specified cell.

--
Rick (MVP - Excel)


"Palpha32" wrote in message
...
I have a worksheet that has four command buttons to run macros. If it is
used on a computer with a different screen resolution the buttons are in a
different position. Is there a way of anchoring the buttons to a point on
the worksheet so that they are in the same position, relarive to the
cells,
no matter what the resolution?
Thanks in advance for your help.

Regards
Peter


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
Where is toolbar command button to change percentage of screen? excelsior Excel Discussion (Misc queries) 4 January 5th 09 05:30 AM
command button position Gerry Excel Discussion (Misc queries) 4 November 2nd 08 12:39 PM
Command Button Position Kenny Excel Discussion (Misc queries) 3 October 14th 07 09:19 PM
Screen Resolution Jason Zischke Excel Programming 2 February 15th 06 05:36 AM
Screen Resolution Ronbo Excel Programming 2 January 17th 05 08:45 PM


All times are GMT +1. The time now is 06:03 AM.

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"