Imports System.Text Imports System.IO Imports System.UnauthorizedAccessException Public Class Form1 Dim F1, F2, F3, F4 As Boolean Dim V1DEXT, V1DINT, V1HAPG, V1HAPS, V1DAPG, V1DAPS As Single Dim V2DINT, V2DEXT, V2EPBS, V2ESP As Single Dim V3DINTS, V3DINTI, V3DEXTI, V3HUSI, V3ESP As Single Dim V4DINTS, V4DINTI, V4DEXTI, V4HUSI As Single Dim TUSI1, SEPA As String Dim path As String Dim objShell As Object, objFolder As Object, oFolderItem As Object Dim nom As String Private _xlcells1 As String Private Property xlApp As Object Private Property xlBook As Object Private Property xlSheet As Object Private Property Workbooks As Object Private Property xlrange As Object Private Property xlcells(p1 As Integer, p2 As Integer) As String Get Return _xlcells1 End Get Set(value As String) _xlcells1 = value End Set End Property Private Sub B1_CheckedChanged(sender As Object, e As EventArgs) Handles B1.CheckedChanged If B1.Checked = True Then usi1.BackColor = Color.Transparent Else usi1.BackColor = Color.Black End If If B2.Checked = True Then usi2.BackColor = Color.Transparent Else usi2.BackColor = Color.Black End If If b3.Checked = True Then usi3.BackColor = Color.Transparent Else usi3.BackColor = Color.Black End If If b4.Checked = True Then usi4.BackColor = Color.Transparent Else usi4.BackColor = Color.Black End If If B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = True cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = True ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = True cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = True cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = True cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = True cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = True cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = True cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = True cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = True cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = True cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = True cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = True cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = True cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = True cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = True cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False End If End Sub Private Sub B2_CheckedChanged(sender As Object, e As EventArgs) Handles B2.CheckedChanged If B1.Checked = True Then usi1.BackColor = Color.Transparent Else usi1.BackColor = Color.Black End If If B2.Checked = True Then usi2.BackColor = Color.Transparent Else usi2.BackColor = Color.Black End If If b3.Checked = True Then usi3.BackColor = Color.Transparent Else usi3.BackColor = Color.Black End If If b4.Checked = True Then usi4.BackColor = Color.Transparent Else usi4.BackColor = Color.Black End If If B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = True cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = True ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = True cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = True cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = True cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = True cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = True cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = True cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = True cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = True cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = True cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = True cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = True cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = True cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = True cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = True cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False End If End Sub Private Sub b3_CheckedChanged(sender As Object, e As EventArgs) Handles b3.CheckedChanged If B1.Checked = True Then usi1.BackColor = Color.Transparent Else usi1.BackColor = Color.Black End If If B2.Checked = True Then usi2.BackColor = Color.Transparent Else usi2.BackColor = Color.Black End If If b3.Checked = True Then usi3.BackColor = Color.Transparent Else usi3.BackColor = Color.Black End If If b4.Checked = True Then usi4.BackColor = Color.Transparent Else usi4.BackColor = Color.Black End If If B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = True cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = True ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = True cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = True cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = True cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = True cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = True cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = True cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = True cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = True cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = True cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = True cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = True cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = True cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = True cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = True cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False End If End Sub Private Sub b4_CheckedChanged(sender As Object, e As EventArgs) Handles b4.CheckedChanged If B1.Checked = True Then usi1.BackColor = Color.Transparent Else usi1.BackColor = Color.Black End If If B2.Checked = True Then usi2.BackColor = Color.Transparent Else usi2.BackColor = Color.Black End If If b3.Checked = True Then usi3.BackColor = Color.Transparent Else usi3.BackColor = Color.Black End If If b4.Checked = True Then usi4.BackColor = Color.Transparent Else usi4.BackColor = Color.Black End If If B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = True cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = True ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = True cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = True cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = True cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = True cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = True cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = True cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = True And B2.Checked = False And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = True cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = True cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = True cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = True cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = True And b3.Checked = False And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = True cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = True cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = True And b4.Checked = False Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = True cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False ElseIf B1.Checked = False And B2.Checked = False And b3.Checked = False And b4.Checked = True Then cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = True cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False End If End Sub Private Sub suivant_Click(sender As Object, e As EventArgs) Handles suivant.Click onglet.Visible = True GroupBox3.Visible = False suivant.Visible = False cf0.Visible = False cf1.Visible = False cf2.Visible = False cf3.Visible = False cf4.Visible = False cf34.Visible = False cf24.Visible = False cf23.Visible = False cf234.Visible = False cf14.Visible = False cf13.Visible = False cf134.Visible = False cf12.Visible = False cf124.Visible = False cf123.Visible = False cf1234.Visible = False Annuler.Visible = False Annuler2.Visible = True terminer.Visible = True Label25.Visible = True ' Label26.Visible = True PictureBox5.Visible = False PictureBox6.Visible = True If B1.Checked = True Then dim1.Visible = True PictureBox1.Visible = True Else dim1.Visible = False PictureBox1.Visible = False Call MsgBox("Attention!!! la NON-validation de la première configuration peut entrainer des bugs de créo!!!", Buttons:=vbOKOnly, Title:="Attention configuration") End If Call FolderBrowserDialog1_HelpRequest() End Sub Private Sub terminer_Click(sender As Object, e As EventArgs) Handles terminer.Click Me.Visible = False 'On créer l'objet Excel xlApp = CreateObject("Excel.Application") 'On défini le nombre d'onglets (ici 5) xlApp.SheetsInNewWorkbook = 1 'On ajoute un classeur If B1.Checked = True Then xlBook = xlApp.Workbooks.Add 'On donne un nom au classeur xlBook.SaveAs(path & "\Paramères-usinage-1-" & nom & ".xls") 'On rend le classeur visible xlApp.Visible = True 'On créer l'objet onglet dans le nouveau classeur créé xlSheet = xlBook.Worksheets(1) 'On affecte un nom aux l'onglets xlSheet.Name = "Usinage 1" 'on libère l'objet onglet pour pouvoir en créer un nouveau ... etc xlSheet = Nothing xlBook.save() End If If B2.Checked = True Then xlBook = xlApp.Workbooks.Add 'On donne un nom au classeur xlBook.SaveAs(path & "\Paramères-usinage-2-" & nom & ".xls") 'On rend le classeur visible xlApp.Visible = True 'On créer l'objet onglet dans le nouveau classeur créé xlSheet = xlBook.Worksheets(1) 'On affecte un nom aux l'onglets xlSheet.Name = "Usinage 2" 'on libère l'objet onglet pour pouvoir en créer un nouveau ... etc xlSheet = Nothing xlBook.save() End If If b3.Checked = True Then xlBook = xlApp.Workbooks.Add 'On donne un nom au classeur xlBook.SaveAs(path & "\Paramères-usinage-3-" & nom & ".xls") 'On rend le classeur visible xlApp.Visible = True 'On créer l'objet onglet dans le nouveau classeur créé xlSheet = xlBook.Worksheets(1) 'On affecte un nom aux l'onglets xlSheet.Name = "Usinage 3" 'on libère l'objet onglet pour pouvoir en créer un nouveau ... etc xlSheet = Nothing xlBook.save() End If If b4.Checked = True Then xlBook = xlApp.Workbooks.Add 'On donne un nom au classeur xlBook.SaveAs(path & "\Paramères-usinage-4-" & nom & ".xls") 'On rend le classeur visible xlApp.Visible = True 'On créer l'objet onglet dans le nouveau classeur créé xlSheet = xlBook.Worksheets(1) 'On affecte un nom aux l'onglets xlSheet.Name = "Usinage 4" 'on libère l'objet onglet pour pouvoir en créer un nouveau ... etc xlSheet = Nothing xlBook.save() End If xlApp.SheetsInNewWorkbook = 3 xlApp.Quit() End Sub Private Sub B2ESP_TextChanged(sender As Object, e As EventArgs) Handles B2ESP.TextChanged V2ESP = B2ESP.Text End Sub Private Sub B1DINT_TextChanged(sender As Object, e As EventArgs) Handles B1DINT.TextChanged V1DINT = B1DINT.Text End Sub Private Sub B3DINTI_TextChanged(sender As Object, e As EventArgs) Handles B3DINTI.TextChanged V3DINTI = B3DINTI.Text End Sub Private Sub B1DEXT_TextChanged(sender As Object, e As EventArgs) Handles B1DEXT.TextChanged V1DEXT = B1DEXT.Text End Sub Private Sub B1DAPG_TextChanged(sender As Object, e As EventArgs) Handles B1DAPG.TextChanged V1DAPG = B1DAPG.Text End Sub Private Sub B1DAPS_TextChanged(sender As Object, e As EventArgs) Handles B1DAPS.TextChanged V1DAPS = B1DAPS.Text End Sub Private Sub B1HAPG_TextChanged(sender As Object, e As EventArgs) Handles B1HAPG.TextChanged V1HAPG = B1HAPG.Text End Sub Private Sub B1HAPS_TextChanged(sender As Object, e As EventArgs) Handles B1HAPS.TextChanged V1HAPS = B1HAPS.Text End Sub Private Sub B2DEXT_TextChanged(sender As Object, e As EventArgs) Handles B2DEXT.TextChanged V2DEXT = B2DEXT.Text End Sub Private Sub B2DINT_TextChanged(sender As Object, e As EventArgs) Handles B2DINT.TextChanged V2DINT = B2DINT.Text End Sub Private Sub B2EPBS_TextChanged(sender As Object, e As EventArgs) Handles B2EPBS.TextChanged V2EPBS = B2EPBS.Text End Sub Private Sub B3DINTS_TextChanged(sender As Object, e As EventArgs) Handles B3DINTS.TextChanged V3DINTS = B3DINTS.Text End Sub Private Sub B3HUSI_TextChanged(sender As Object, e As EventArgs) Handles B3HUSI.TextChanged V3HUSI = B3HUSI.Text End Sub Private Sub B3ESP_TextChanged(sender As Object, e As EventArgs) Handles B3ESP.TextChanged V3ESP = B3ESP.Text End Sub Private Sub B3DEXTI_TextChanged(sender As Object, e As EventArgs) Handles B3DEXTI.TextChanged V3DEXTI = B3DEXTI.Text End Sub Private Sub B4DINTS_TextChanged(sender As Object, e As EventArgs) Handles B4DINTS.TextChanged V4DINTS = B4DINTS.Text End Sub Private Sub B4HUSI_TextChanged(sender As Object, e As EventArgs) Handles B4HUSI.TextChanged V4HUSI = B4HUSI.Text End Sub Private Sub B4DINTI_TextChanged(sender As Object, e As EventArgs) Handles B4DINTI.TextChanged V4DINTI = B4DINTI.Text End Sub Private Sub B4DEXTI_TextChanged(sender As Object, e As EventArgs) Handles B4DEXTI.TextChanged V4DEXTI = B4DEXTI.Text End Sub Private Sub FolderBrowserDialog1_HelpRequest(sender As Object, Optional p2 As Object = Nothing, Optional e As EventArgs = Nothing) Throw New NotImplementedException End Sub Private Sub FolderBrowserDialog1_HelpRequest() Me.Visible = False objShell = CreateObject("Shell.Application") objFolder = objShell.BrowseForFolder(&H0&, "Choisir un répertoire d'enregistrement des fichiers de transfert", &H1&) On Error GoTo Gesterr oFolderItem = objFolder.Items.Item path = oFolderItem.Path nom = InputBox("Nom du projet", "Nom du projet") 'La variable reçoit la valeur entrée dans l'InputBox 'la tu peux faire un test pour savoir si l'utilisateur a mis un .xls ou non MsgBox(path & "\" & "Paramères-usinage-" & nom & ".xls") 'a remplacé par l'enregistrement Me.Visible = True Gesterr: End Sub Private Sub SystemException(p1 As Object) Throw New NotImplementedException End Sub Private Function OpenShare(p1 As String) As Object Throw New NotImplementedException End Function Private Function cells(p1 As Integer, p2 As Integer) As Object Throw New NotImplementedException End Function Private Function _xlcells() As String Throw New NotImplementedException End Function Private Function cells(p1 As String) As Object Throw New NotImplementedException End Function End Class