Sometimes, when I check some variable on my excel macro, Outlook opens by itself. This is pretty annoying since I am not even using Outlook and not configured. What's going on here?
I am using Office 2016.
Edit: I don't think this is due to the actual macro, but anyway, here it is:
Sub duplicateSheets()
Dim i As Integer
For i = 1 To 3
ThisWorkbook.Sheets("classes").Copy _
After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
ThisWorkbook.Sheets("pivot").Copy _
After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
Next
End Sub
Outlook opens when I check ThisWorkbook.Sheets("classes").
source
share