PC to Mac formatting issues

R

robotman

I'm writing a macro that needs to work on PC and Mac platforms. I'm
using PC Excel 2003 and Mac Excel 2004.

I'm having a hard time getting a consistent format/look between the
platforms:

* The spreadsheet and font appearances on the Mac are much smaller
even though the font type and size are the same.
* The text in forms on the Mac are much bigger
* Button are different sizes on the Mac, even though the sizes are
specified exactly in the code.

Both the PC and Mac have the same screen resolution. The PC
correctly sizes windows, forms, and buttons to the code
specifications... I'm
not sure what the Mac is doing!

Does anyone have some tips (or a link to a webpage) to make the
formats between the Mac and PC more consistent? I've tried various
fonts (currently using Verdana), but that doesn't seem to be the core
issue.

Thanks!

John
 
J

jr

I'm writing a macro that needs to work on PC and Mac platforms. I'm
using PC Excel 2003 and Mac Excel 2004.

I'm having a hard time getting a consistent format/look between the
platforms:

* The spreadsheet and font appearances on the Mac are much smaller
even though the font type and size are the same.
* The text in forms on the Mac are much bigger
* Button are different sizes on the Mac, even though the sizes are
specified exactly in the code.

Both the PC and Mac have the same screen resolution. The PC
correctly sizes windows, forms, and buttons to the code
specifications... I'm
not sure what the Mac is doing!

Does anyone have some tips (or a link to a webpage) to make the
formats between the Mac and PC more consistent? I've tried various
fonts (currently using Verdana), but that doesn't seem to be the core
issue.

Thanks!

John

The fonts are different even at the same size regardless of
application. You could try Tahoma. It isn't as wide as Verdanna.
 
J

JE McGimpsey

robotman said:
Does anyone have some tips (or a link to a webpage) to make the
formats between the Mac and PC more consistent? I've tried various
fonts (currently using Verdana), but that doesn't seem to be the core
issue.

As you've noticed, Mac userforms, in addition to a few other problems,
are scaled differently. I suspect this stemmed from differences between
Mac and Windows display standards.

I've attacked this in two different ways for clients:

1) Designed userform(s) in one platform, then write a conditionally
compiled routine to scale each type of control (form, button, textbox,
label, etc.) if run on the other platform. This option takes some
upfront processing, but makes references to the userforms easier in the
remaining code.

Const cdSCALEFACTOR As Double = 1.33333333
Dim fmForm1 As WinForm1
Dim ctrl As Control
Set fmForm1 = New WinForm1
#If Mac Then
With fmForm1
.Width = .Width * cdSCALEFACTOR
.Height = .Height * cdSCALEFACTOR
For Each ctrl In fmForm1.Controls
Select Case TypeName(ctrl)
Case "Label"
With ctrl
.Width = .Width * cdSCALEFACTOR
.Height = .Height * cdSCALEFACTOR
End With
Case "CommandButton"
'etc
End Select
Next ctrl
End With
#End If
fmForm1.Show

2) Designed a different form (with the same code underneath) for each
platform, then call the forms using conditional compilation, e.g.,

Dim oForm1 As Object
#If Mac Then
Set oForm1 = New MacForm1
#Else
Set oForm1 = New WinForm1
#End If
oForm1.Show

While a bit more work (depending on how many userforms you're using), it
doesn't take any setup processing.
 
R

robotman

Thank you for your two strategies. I was hoping to avoid conditional
compilation and OS specific forms, but it appears there isn't a magic
workaround. I hadn't thought of either of your approaches which make
it a little less painful.

Scaling might be viable for some of the stuff I'm doing. Definitely
setting a Form object to the appropriate OS form (rather than trying
to manage two separate forms and all their respective components
independently) will work.

Thanks for your help!

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top