ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Form Position (https://www.excelbanter.com/excel-programming/421317-form-position.html)

steven

Form Position
 
Is there a way to make a form open where the top left corner of the form will
be the one cell to the right and one cell down from the active cell.

Thank you,

Steven

Corey[_3_]

Form Position
 
Steven,
I think it can only be positioned in accord to the screen size, from the TOP
and the LEFT.

If all users have the same screen resolution then do a trial & error test on
the Top/Left to see where each cell is located to get it to appear close to
where required.

Corey....

"Steven" wrote in message
...
Is there a way to make a form open where the top left corner of the form
will
be the one cell to the right and one cell down from the active cell.

Thank you,

Steven




Héctor Miguel

Form Position
 
hi, Steven !

Is there a way to make a form open where the top left corner of the form
will be the one cell to the right and one cell down from the active cell...


all you need is Chip's Form Positioner
http://www.cpearson.com/Excel/FormPosition.htm

regards,
hector.



steven

Form Position
 
Héctor,

Thank you for the response. I tried the download file and it gives me an
error in this section at the : VCmdArr(.RowIndex) = .Height ; it says
subscript out of range for the VCmdArr(.RowIndex). What is causing this?

For Each CmdBar In Application.CommandBars
With CmdBar
If (.Visible = True) And (.Position = msoBarTop) Or (.Position =
msoBarMenuBar) Then
If .RowIndex 0 Then
VCmdArr(.RowIndex) = .Height
End If
End If
If (.Visible = True) And (.Position = msoBarLeft) Then
If .RowIndex 0 Then
HCmdArr(.RowIndex) = .Width
End If
End If
End With
Next CmdBar


Thank you,


Steven

"Héctor Miguel" wrote:

hi, Steven !

Is there a way to make a form open where the top left corner of the form
will be the one cell to the right and one cell down from the active cell...


all you need is Chip's Form Positioner
http://www.cpearson.com/Excel/FormPosition.htm

regards,
hector.




Chip Pearson

Form Position
 
You'll need to change the size of two arrays:

' CHANGE
Dim VCmdArr(0 To 20) As Single ' hold our command bar widths
Dim HCmdArr(0 To 20) As Single ' of command bars.
' TO
Dim VCmdArr(0 To 50) As Single ' hold our command bar widths
Dim HCmdArr(0 To 50) As Single ' of command bars.

The code doesn't work in Excel 2007 due to the change from normal
command bars to the Ribbon UI.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)





On Sun, 14 Dec 2008 23:29:52 -0600, "Héctor Miguel"
wrote:

hi, Steven !

Is there a way to make a form open where the top left corner of the form
will be the one cell to the right and one cell down from the active cell...


all you need is Chip's Form Positioner
http://www.cpearson.com/Excel/FormPosition.htm

regards,
hector.


steven

Form Position
 
So incredible!

"Chip Pearson" wrote:

You'll need to change the size of two arrays:

' CHANGE
Dim VCmdArr(0 To 20) As Single ' hold our command bar widths
Dim HCmdArr(0 To 20) As Single ' of command bars.
' TO
Dim VCmdArr(0 To 50) As Single ' hold our command bar widths
Dim HCmdArr(0 To 50) As Single ' of command bars.

The code doesn't work in Excel 2007 due to the change from normal
command bars to the Ribbon UI.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)





On Sun, 14 Dec 2008 23:29:52 -0600, "Héctor Miguel"
wrote:

hi, Steven !

Is there a way to make a form open where the top left corner of the form
will be the one cell to the right and one cell down from the active cell...


all you need is Chip's Form Positioner
http://www.cpearson.com/Excel/FormPosition.htm

regards,
hector.




All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com