title: VBA windows to mac
body: <p>I made a code on my Windows PC, have multiple macro's/VBA's but made the  file for somebody with an Mac.</p>
  
  <p>not sure where to start with adjusting code, but has anyone a clue how the following problems are caused, this will help me with finding a solution.. I probably used windows specific components..</p>
  
  <p>if somebody can push me in the right direction, it would be great.. Have found a few topics:
  <a href="http://www.vbaexpress.com/forum/archive/index.php/t-12976.html" rel="nofollow">http://www.vbaexpress.com/forum/archive/index.php/t-12976.html</a></p>
  
  <p>and this one probably has the solution for my PDF problem:
  <a href="https://stackoverflow.com/questions/27507253/excel-vba-code-to-work-on-mac-create-pdf-function">Excel VBA code to work on Mac, Create PDF Function</a></p>
  
  <p>Problem 1: colomnwidth doesn't work:</p>
  
  <pre><code>End With
  Columns("A:A").EntireColumn.AutoFit
  Columns("A:A").ColumnWidth = 26
  Columns("C:H").Select
  Selection.ColumnWidth = 4.5
  Columns("J:L").Select
  Selection.ColumnWidth = 11.5
  Columns("I:I").Select
  Selection.ColumnWidth = 16.25
  Columns("B:B").ColumnWidth = 11.5
  Columns("J:L").Select
  Selection.ColumnWidth = 10.25
  Columns("I:I").EntireColumn.AutoFit
  </code></pre>
  
  <p>Button to make PDF gives "Could not Create PDF"</p>
  
  <pre><code>Sub SaveConcept()
  Dim ws As Worksheet
  Dim strPath As String
  Dim myFile As Variant
  Dim strFile As String
  On Error GoTo errHandler
  
  Range("N8:N9").Select
      With Selection.Interior
          .Pattern = xlSolid
          .PatternColorIndex = xlAutomatic
          .Color = 5287936
          .TintAndShade = 0
          .PatternTintAndShade = 0
      End With
  
  ActiveSheet.PageSetup.Orientation = xlLandscape
  
  Set ws = ActiveSheet
  
  strFile = Range("J15") _
              &amp; Format(Now(), " dd-mm-yyyy") _
              &amp; Format(" Concept") _
              &amp; ".pdf"
  strFile = ThisWorkbook.Path &amp; "\" &amp; strFile
  
  myFile = Application.GetSaveAsFilename _
      (InitialFileName:=strFile, _
          FileFilter:="PDF Files (*.pdf), *.pdf", _
          Title:="Select Folder and FileName to save")
  
  If myFile &lt;&gt; "False" Then
    ActiveSheet.Range("L1", _
     ActiveSheet.Range("L1").End(xlDown).End(xlDown).End(xlDown).End(xlToLeft).End(xlToLeft).End(xlToLeft).End(xlDown)).ExportAsFixedFormat _
          Type:=xlTypePDF, _
          Filename:=myFile, _
          Quality:=xlQualityStandard, _
          IncludeDocProperties:=True, _
          IgnorePrintAreas:=False, _
          OpenAfterPublish:=True
  
  End If
  exitHandler:
      Exit Sub
  errHandler:
      MsgBox "Could not create PDF file"
      Resume exitHandler
  
  End Sub
  </code></pre>
  
  <p>thanks </p>