Although this is a very old question, I was searching for the same answer so followed Sahonero's question and provide my fix for anyone else with the same problem.
Although it's a not very elegant, at least it's a fix - for now until someone more enlightened comes along.
In the UserForm code provided by Leith Ross, add two lines, one before and one after the call to the API routine "(RemoveFrame)":
- Set the user form height to 0. (This makes the removal of the Windows Title Bar and Borders occur on a zero height object.)
- After the call, set the height as desired. (This expands the unframed user form to its correct height.)
My example sets it at a fixed height (determined by trial and error based on the heights of the controls on the form). You can code it to match the content of the user form by adding lines before the last to calculate based on the heights of the controls. The same applies to width obviously
UserForm Code
I'd be more than happy for someone to provide the elegant solution!
Bookmarks