Thanks for your reply and setting me straight as you have for everyone in many of your post! I got it to work by using this code :
Code:
Function SaveChanges() As Boolean
Dim strTabText As String = tc1.SelectedTabPage.Text
Dim reply As MsgBoxResult
reply = MsgBox("Have you saved your document(s)?", MsgBoxStyle.YesNo + vbQuestion)
If reply = MsgBoxResult.Yes Then
tc1.SelectedTabPage.Dispose()
Else
For Each Page As DevExpress.XtraTab.XtraTabPage In tc1.TabPages
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
CType(Page.Controls.Item(0), AxXtremeSyntaxEdit.AxSyntaxEdit).SaveFileAs(SaveFileDialog1.FileName)
lastSavePath = SaveFileDialog1.FileName
End If
Next Page
End If
End Function