Form Position

S

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.

Thank you,

Steven
 
C

Corey

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....
 
S

Steven

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
 
C

Chip Pearson

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)
 
S

Steven

So incredible!

Chip Pearson said:
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top