title: EXCEL VBA: opening XLSM excel using vba
body: <p>i cant figure out my error in my codes</p>
  
  <pre><code>If cboUnit.Text = "MARINER" Then
  Application.ScreenUpdating = False
  Application.Workbooks.Open Filename:=ThisWorkbook.Path &amp; "\UNIT" &amp; "\MARINER"
  ThisWorkbook.Activate
  Workbooks("TOUKEI DATA REPORT GRAPHING").Close
  End If
  </code></pre>
  
  <p>i just want to open xlsm file which is on the folder unit
  but i always got an error:</p>
  
  <p>runtime error '1004'
  the file this getting is 'xlsx' extension</p>