ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Form Positioning with Freeze Panes (https://www.excelbanter.com/excel-programming/301123-form-positioning-freeze-panes.html)

Pete[_18_]

Form Positioning with Freeze Panes
 
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


All times are GMT +1. The time now is 11:13 PM.

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