Bonjour chers gars
Je souhaite enregistrer automatiquement mon
fichier xlsx dans ce style:

Le point2012-01-14_1
Le point2012-01-14_2
lorque le _1 vient à exister.

Le logiciel que je monte écrit dans un classeur excel.
Suivez plutot:


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Private Sub yes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles yes.Click
        Dim oExcel As Object
        Dim oBook As Object
        Dim oSheet As Object


        'Start a new workbook in Excel
        oExcel = CreateObject("Excel.Application")
        oBook = oExcel.Workbooks.Add


        'Add data to cells of the first worksheet in the new workbook
        oSheet = oBook.Worksheets(1)

        oSheet.Range("A2").value = "Cyber"
        oSheet.Range("B2").Value = TB1.Text
        oSheet.Range("C2").Value = tb2.Text

        oSheet.Range("A3").value = "Photocopie"
        

        oSheet.Range("A5").value = "Saisie"

        oSheet.Range("A6").value = "Biscuit"

        oSheet.Range("A8").value = "              Total"
        oSheet.range("D1").Value = "              Total"
        oSheet.Range("A8").font.bold = True
        oSheet.Range("D8").Value = TextBox4.Text
        oSheet.Range("D8").font.bold = True
        oSheet.Range("D2").value = TextBox4.Text
        oSheet.Range("B1").Value = "             Matin"
        oSheet.Range("C1").Value = "                Soir"
        oSheet.Range("B1:C1: D1").Font.Bold = True

        'Save the Workbook and Quit Excel


        oBook.SaveAs("C:\Documents and Settings\Administrateur\Mes documents\Visual Studio 2010\Projects\Cyber Café\Caisse\Le point.xlsx")
        oExcel.quit()

        Dim form As New Form1
        Form1.Show()
        Me.Dispose()
    End Sub

Je sais qu'il faut agir sur Le point"......."xlsx mais comment?
Je vous remercie.