Form Positioning with Freeze Panes

P

Pete

I am trying to anchor a UserForm to a particular cell. I used the code
from Vic Eldridge, from a thread "form positioning", posted
2002-05-30, which works great! Excerpted below:

hWndXLChart = FindWindowEx(hWndXLDesk, 0&, "EXCELE", vbNullString)
GetWindowRect hWndXLChart, winRect

If I use the "Freeze panes" command to fix the top 10 rows at the top
of the sheet, then this code no longer operates correctly. When I
freeze panes, the rectangle coordinates returned by GetWindowRect for
the chart window seem to be unusable. My anchor cell is in this
"frozen" area (for example, "A5").

Does anyone know how to obtain good coordinates for the chart window,
even with "Freeze panes"?

Thanks very much,

Pete
 

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