Comboboxtan seçilen departmanı if komutuyla kontrol ettirerek yapabilirsin.
If ComboBox1.Text = "Makina Bakım Raporu" Then
Try
Dim fs As System.IO.FileStream = New System.IO.FileStream("c:\raporlar\makinabakimraporu.doc", IO.FileMode.Append, IO.FileAccess.Write)
Dim yazdırma As System.IO.StreamWriter = New System.IO.StreamWriter(fs)
MonthCalendar1.MaxSelectionCount = 1
yazdırma.Write(Chr(13) + (MonthCalendar1.SelectionRange.Start + " " + RichTextBox1.Text)) 'chr(13) komutu bir alt satıra geciriyor.
yazdırma.Close()
fs.Close()
Catch
End Try
End If
<<< 10-HAGİ-10 >>>