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