Position a chart according to the position of the userform

G

Gaetan

Dear all,

In VBA, I am trying to move a chart according to the position of a
userform.

How do I calculate the x and y position of the chart so that it will
be aligned with the position of the userform.

Thank you

Gaetan
 
G

Gaetan

Dear all,

In VBA, I am trying to move a chart according to the position of a
userform.

How do I calculate the x and y position of the chart so that it will
be aligned with the position of the userform.

Thank you

Gaetan

I found how to do it for the left position

Set cellule_visible_haut = Cells(ActiveWindow.ScrollRow,
ActiveWindow.ScrollColumn)
ActiveSheet.Shapes("graphique").Left = _
UF_gestionnaire_graphique.Left - _
(Application.Left + _
ActiveWindow.Left + _
23) + _
cellule_visible_haut.Left

The top is not easy as well..Any ideas are welcome.

Thanks

Gaetan
 
G

Gaetan

I found how to do it for the left position

Set cellule_visible_haut = Cells(ActiveWindow.ScrollRow,
ActiveWindow.ScrollColumn)
ActiveSheet.Shapes("graphique").Left = _
UF_gestionnaire_graphique.Left - _
(Application.Left + _
ActiveWindow.Left + _
 23) + _
 cellule_visible_haut.Left

The top is not easy as well..Any ideas are welcome.

Thanks

Gaetan

More precisely, how to calculate the height of the ribbon + formula
area + headings, etc. i.e. everything above the first visible cell...
 

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