Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Cbo_TAR_Click() Select Case Me.Cbo_TAR.Text Case "Chabal (Fonderie)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\CHABAL" Case "DSR (Tôlerie)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\DSR" Case "PF 301 (Filage)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\PF301" Case "F 132 (Fonderie refusion copeaux)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\F132" Case "F 212/219 (Atelier Tôles Fortes)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\F212-219" Case "F 230 (Atelier Tôles Fortes)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\F230" Case "F 233 (Atelier Tôles Fortes)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\F233" Case "F 235 (Atelier Tôles Fortes)" File1.Path = "C:\Users\Antoine\Desktop\STAGE\F235" End Select End Sub Private Sub Cmd_imprimer_Click(Index As Integer) CD_imp.ShowPrinter End Sub Private Sub Cmd_modifier_Click(Index As Integer) Dim xlApp As Excel.Application Set xlApp = New Excel.Application xlApp.Visible = True xlApp.Workbooks.Open FileName:=File1.Path & "" & File1.FileName Dim WordApp As Word.Application Dim WordDoc As Word.Document Set WordApp = CreateObject("Word.Application") WordApp.Visible = True Set WordDoc = WordApp.Documents.Open(File1.Path & "" & File1.FileName) End Sub Private Sub Cmd_ouvrir_Click() Dim xlApp As Excel.Application Set xlApp = New Excel.Application xlApp.Visible = True xlApp.Workbooks.Open FileName:=File1.Path & "" & File1.FileName, ReadOnly:=xlYes Dim WordApp As Word.Application Dim WordDoc As Word.Document Set WordApp = CreateObject("Word.Application") WordApp.Visible = True Set WordDoc = WordApp.Documents.Open(File1.Path & "" & File1.FileName, ReadOnly:=True) End Sub Private Sub Form_Load() Lbl_1.Caption = "Sélectionner une tour aéroréfrigérante :" Cbo_TAR.AddItem "Veuillez sélectionne une TAR", 0 Cbo_TAR.AddItem "Chabal (Fonderie)", 1 Cbo_TAR.AddItem "DSR (Tôlerie)", 2 Cbo_TAR.AddItem "PF 301 (Filage)", 3 Cbo_TAR.AddItem "F 132 (Fonderie refusion copeaux)", 4 Cbo_TAR.AddItem "F 212/219 (Atelier Tôles Fortes)", 5 Cbo_TAR.AddItem "F 230 (Atelier Tôles Fortes)", 6 Cbo_TAR.AddItem "F 233 (Atelier Tôles Fortes)", 7 Cbo_TAR.AddItem "F 235 (Atelier Tôles Fortes)", 8 Cbo_TAR.ListIndex = 0 Img1.Picture = LoadPicture(App.Path & "\plan.jpg") Img2.Picture = LoadPicture(App.Path & "\logo.jpg") End Sub