![2011 2011](/uploads/1/3/3/9/133919741/377746781.jpg)
To create a new UserForm 1. Open the Excel workbook and go to VBA (ALT + F11). Under VBA, click the 'Insert UserForm' button. Click Toolbox button. Use controls on the form by clicking the appropriate button on the toolbox. To edit the properties of a control, use the Properties window. To remove a control, select and press the. I have an Excel workbook that was created by a former coworker. It includes a macro that, among other things, displays a message box about the 2008 file. The macro runs as soon as the file is opened. I'd like to access that macro to correct the date to 2011 and see what else, if anything, it's doing for me (it doesn't appear to do much).
MaxR
New member
There may be other reasons your userform will not work as expected on the Mac. Userforms which are properly sized in Windows will appear very small on the Mac. There are ways to get around this, once the userform successfully appears on the Mac in any size. Hello, I try to build up a user friend userform from the screen point of view, my target is that the userform controls autofit to the screen size. Is there any kind of way to do this? Excel VBA Resize. Resize is a property available in VBA to change or resize the range of cells from the active cell as needed. For example, assume you are in the cell B5, and from this cell, if you want to select 3 rows and two columns, we can change the size of a range by using the RESIZE property of VBA.
![How do i resize a userform in excel 2011 for mac os How do i resize a userform in excel 2011 for mac os](/uploads/1/3/3/9/133919741/855381819.gif)
How Do I Resize A Userform In Excel 2011 For Mac Os
I am new to Mac coding. I have an excel workbook application that was originally written in Windows. It essentially runs with Excel minimised then using the Onetime function it causes a userform to show/popup (modeless) periodically. In Windows I have used user32 APIs to set the userform window to always on top, but I'm struggling to find an equivalent method in Apple OSX (El Capitan). Perhaps I have foolishly presumed that OSX supports this functionality, but empirically there is evidence in some applications that it may be possible. I have found references to something in Cocoa relating to NSWindows (whatever they are) that allows a value of NSFloatingWindowLevel to be set such that it will float above all other windows. There is even a reference to another value that apparently would make a window float above even the screensaver, but that's not necessary.
I admit that I don't understand Apple APIs or their equivalent, but I simply assume there was a way (in VBA) of including OSX libraries (dylibs), then to call functions defined within those libraries and that one of these libraries might contain a function to float a window. In Windows it's straight forward: You use the user32 FindWindow function to get the handle of the userform widow by its window title, then use that handle to set the window level to TopMost.
Is there a similar method that can be used in VBA to achieve the same result from Excel VBA on a Mac? All I need is for the userform to appear over the top of the current application window when activated, always on top, topmost, or floating in some way - it doesn't matter as long as the popup is immediately visible to the user.
By way of background as to why I'd like to achieve this; my application is a time keeping tool and it is designed to prompt the user to periodically record what they've been doing in the previous period (e.g. last 15 minutes). Of course, while the userform may activate in Excel, if it is not visible and behind another application window, then it kind of defeats the purpose as the user is not reminded to record their time, especially if they have change tasks.
Anecdotally, I think this used to work in earlier versions of O365, Excel for Mac as I only seem to have experienced this challenge in the past few months and I transferred my workbook and its macros to Mac almost 1yr ago. Perhaps the userform.show modeless function has changed? I wouldn't be surprised as an earlier build of Excel (15.12 I think) stopped all the forms buttons from working and the most recent build 15.22 stopped the userform textbox control (at least) from being able to be edited properly and i had to reinstalled Excel 15.21. I am still waiting for a new build to be released that corrects the problems introduced by 15.22, but have a 15.21 pkg file on standby.
Hope someone can help.
Max
I admit that I don't understand Apple APIs or their equivalent, but I simply assume there was a way (in VBA) of including OSX libraries (dylibs), then to call functions defined within those libraries and that one of these libraries might contain a function to float a window. In Windows it's straight forward: You use the user32 FindWindow function to get the handle of the userform widow by its window title, then use that handle to set the window level to TopMost.
Is there a similar method that can be used in VBA to achieve the same result from Excel VBA on a Mac? All I need is for the userform to appear over the top of the current application window when activated, always on top, topmost, or floating in some way - it doesn't matter as long as the popup is immediately visible to the user.
By way of background as to why I'd like to achieve this; my application is a time keeping tool and it is designed to prompt the user to periodically record what they've been doing in the previous period (e.g. last 15 minutes). Of course, while the userform may activate in Excel, if it is not visible and behind another application window, then it kind of defeats the purpose as the user is not reminded to record their time, especially if they have change tasks.
Anecdotally, I think this used to work in earlier versions of O365, Excel for Mac as I only seem to have experienced this challenge in the past few months and I transferred my workbook and its macros to Mac almost 1yr ago. Perhaps the userform.show modeless function has changed? I wouldn't be surprised as an earlier build of Excel (15.12 I think) stopped all the forms buttons from working and the most recent build 15.22 stopped the userform textbox control (at least) from being able to be edited properly and i had to reinstalled Excel 15.21. I am still waiting for a new build to be released that corrects the problems introduced by 15.22, but have a 15.21 pkg file on standby.
Hope someone can help.
Max