How Do I Resize A Userform In Excel 2011 For Mac

Posted on by
  1. How Do I Resize A Userform In Excel 2011 For Mac Os
  2. How Do I Resize A Userform In Excel 2011 For Macs
  3. How Do I Resize A Userform In Excel 2011 For Mac Shortcut
  4. How Do I Resize A Userform In Excel 2011 For Mac 64-bit

Question: Q: Excel 2011 problem: windows resize automatically when switching between workbooks I am facing a very annoying problem when opening several workbooks in Excel. When shifting from one workbook to the other (either by selecting the workbook from the menu list, or by cycling through using 'cmd + '), the workbook jumps to a smaller. Question: How do I rotate text in a cell in Microsoft Excel 2011 for Mac? Answer: Select the cell(s) that you wish to rotate the text for. Right-click and then select 'Format Cells' from the popup menu. When the Format Cells window appears, select the Alignment tab. Then set the number of. Choose Edit→Paste Special. Select the Transpose check box and then click OK. Using Paste Special with objects in Excel 2011 for Mac. If you copy an object, rather than a cell or cell range, the Paste Special dialog offers paste options appropriate to the kind of object you are pasting. You can try the code below on a Mac in Excel 2011 to always open the userform in the center of your Excel window. Note: The code below will not work in 2016 and higher because the Macscript function is not working anymore in a lot of situations because of Apple Sandbox requirements. Office 2016 for Mac is sandboxed. Unlike other versions of Office apps that support VBA, Office 2016 for Mac apps are sandboxed. Sandboxing restricts the apps from accessing resources outside the app container.

How do i resize a userform in excel 2011 for mac os

The Problem.

There are many annoyances when designing a VBA project to run on both Windows and Mac computers. One of the most noticeable is related to the difference in screen resolution between the two platforms. On the Mac, it’s 96 dpi, where each dot represents a pixel. In Windows, screen resolution is 72 dpi (dots per inch) and each dot represents a “point”, while pixels are still 96 per inch. Confusing the issue is that VBA in Windows uses points as the measurement unit for designing UserForms, while VBA on the Mac uses pixels. The result is that without applying any correction, UserForms that come out just right in Windows are only 75% as large on the Mac, making them difficult to read.

For example, here is a UserForm designed in Windows, opened in Windows. The text might seem a bit small to me now that my eyes are getting older, but it’s still perfectly legible.

Here is that same UserForm opened on a Mac. The header text is fine, but the text in the dialog itself is too small to read comfortably.

In the past, I supported separate add-ins, one for Windows and the other for Mac. The dialogs for each were appropriately sized, and I took care of other coding idiosyncrasies in the separate files. But it’s a lot of extra work to lug around two separate versions of every file. Every adjustment you make has to be made twice, and it’s hard to remember what changes you’ve made across large projects.

The Solution: UserForms For Mac And Windows.

I have developed a simple routine that is called from each UserForm’s initialize event, which changes the size, position, and font of each control by a factor of 4/3. The text still may not always be perfect, since you can only specify whole number font sizes, so I suppose I should always round up the font size. I do make sure when I design the form that controls are more than large enough in case the text takes up extra space. Aside from this, it works pretty nicely.

How Do I Resize A Userform In Excel 2011 For Mac Os

Here is a UserForm designed in Windows, but which uses the resizing routine so it displays legibly on either computer. First, it is shown opened in Windows.

Below it’s shown opened on the Mac. The dialogs are equally legible, and the text came out pretty much the same. Sometimes a large block of text may not wrap the same, so if it really matters, you should hard code your line breaks by typing Ctrl+Return while entering the text.

Note: While Microsoft has substantially improved the VB editor on the Mac, you still can’t work with UserForms on the Mac. You have to build them into your file in Windows and them move the file to the Mac.

How Do I Resize A Userform In Excel 2011 For Macs

The Code.

This calls the routine from the UserForm’s code module:

The #If Mac Then and #End If structure indicates a section of code which is conditionally compiled. When using a Mac, the constant Mac is True, so the code between #If and #End If is compiled and run, so the UserForm is resized. In Windows, this code is ignored, and the UserForm is displayed without rescaling.

Matlab 2013 free with crack 32 bit download. The global resizing factor is placed in an appropriate place in the declarations section of a regular code module:

And this routine in a regular code module does the resizing:

Example Workbook.

I’ve posted a simple workbook that illustrates this technique. Download it by clicking the icon below.

When you open the workbook, you’ll see a blank worksheet with three buttons.

The first button opens the Windows-only UserForm shown in the first and second figures above, in the description of the problem.

The second button opens the Windows-and-Mac UserForm shown in the third and fourth figures, in the description of the solution.

The third button opens another Windows-and-Mac UserForm which also has a simple mechanism to call the ResizeUserForm procedure, and resize the UserForm on the fly. Here is it opened in Windows.

Enter a number in the New Form Magnification box (for example 2) and click Apply, and the form is resized accordingly.

How Do I Resize A Userform In Excel 2011 For Mac Shortcut

Enter 1.333333, the ratio between pixels and points, and this is how it will be resized for the Mac, though it’s too large for Windows.

Enter 0.75, the inverse of the above, and you get a sense for how small it would be on the Mac without rescaling. Yeah, way too small.

How Do I Resize A Userform In Excel 2011 For Mac 64-bit

Here is the same form opened on a Mac. Note that it’s already resized to 1.333333. Resized nicely.

How

Let’s see how it looks at 200%. Pretty large.

How Do I Resize A Userform In Excel 2011 For Mac

If you enter 1 in the box, you can see how the form would look without resizing.

How do i resize a userform in excel 2011 for macs

In all of your real projects, you should apply this technique to all of your UserForms. Open scn file online. Before deploying them to your users, you should make sure that the UserForms that look fine in Windows rescale properly on a Mac. Occasionally text wraps differently or certain other controls may need adjustments. But this eliminates the need for separate UserForms for Mac and Windows.