title: Excel macro is printing all sheets and not just selected one
body: <p>I have an excel macro that is launched by clicking a button.
  What macro should do is print out one excel worksheet and increment value in one cell after each print.
  Everything works fine EXCEPT the macro ALSO PRINTS the sheet where macro is launched (eventhough that sheet is not selected in code..)</p>
  
  <p>Here is my macro code:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub Painike_Napsauta()
  Dim i As Long
  
  If MsgBox("Tulosta?", vbYesNo + vbQuestion) = vbNo Then Exit Sub
  Cancel = True
  Application.EnableEvents = False
  Application.Dialogs(xlDialogPrint).Show
  Sheets("Lappu").Range("C1").Value = Sheets("Tulosta").Range("C2").Value
  For i = Sheets("Tulosta").Range("C3").Value To Sheets("Tulosta").Range("C4").Value
      Sheets("Lappu").Range("C2").Value = i
      Sheets("Lappu").PrintOut
  Next i
  
  Application.EnableEvents = True
  End Sub
  </code></pre>
  
  <p>So all I want to print is "Lappu" sheet in every iteration, but for some reason also "Tulosta" sheet is printed and it is the first page that is printed.</p>
  
  <p>Where is the problem?</p>