title: Saving Macro Enabled workbook as .xlxs
body: <p>I've set up a worksheet with a Macro in that checks the formatting of various cells, and at the end saves it as a normal .xlxs spreadsheet in the users C: drive.</p>
  
  <p>The code I've been trying is </p>
  
  <pre><code>Dim sheetName As String
  Dim tempwb As Workbook
  Dim currentworkbook As String
  Dim currentformat As Long
  
      currentworkbook = ThisWorkbook.FullName
      currentformat = ThisWorkbook.FileFormat
      sheetname = "Risk Info"
  
      ThisWorkbook.Sheets(sheetName).Copy before:=tempwb.Sheets(1)
      ThisWorkbook.Sheets(sheetName).SaveAs Filename:="C:\xstreamv1\inbox\xstream_data_sheet.xlsx", FileFormat :=51
      tempwb.Close savechanges:=False
  
      ThisWorkbook.SaveAs Filename:=currentworkbook, FileFormat:=currentformat
      ActiveWorkbook.Close savechanges:=False
  
      ActiveWorkbook.Close False
  </code></pre>
  
  <p>When I run the Macro it does create the xlxs copy I want, but it also creates and opens copies of the sheet I'm working in, and then crashes for a while!</p>
  
  <p>Any advice would be much appreciated!</p>