Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimer
une référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimer
une référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimer
une référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" a écrit dans le message de
news:cdtveu$mln$Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimerune référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" <joel-garbe@wanadoo.fr> a écrit dans le message de
news:cdtveu$mln$1@news-reader4.wanadoo.fr...
Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimer
une référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" a écrit dans le message de
news:cdtveu$mln$Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimerune référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" a écrit dans le message de
news:cdtveu$mln$Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimerune référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" <joel-garbe@wanadoo.fr> a écrit dans le message de
news:cdtveu$mln$1@news-reader4.wanadoo.fr...
Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimer
une référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" a écrit dans le message de
news:cdtveu$mln$Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimerune référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" a écrit dans le message de
news:cdtveu$mln$Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimerune référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" <joel-garbe@wanadoo.fr> a écrit dans le message de
news:cdtveu$mln$1@news-reader4.wanadoo.fr...
Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimer
une référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr
Bonsoir Joel;
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function Putfocus& Lib "user32" Alias _
"SetFocus" (ByVal hwnd&)
Private Sub VbaUnlock(ByVal Wbk$, ByVal PWord$)
If Workbooks(Wbk).VBProject.Protection = 0 Then Exit Sub
Set Application.VBE.ActiveVBProject = Workbooks(Wbk).VBProject
SendKeys PWord & "~~"
Application.VBE.CommandBars(1).FindControl(ID:%78,
recursive:=True).Execute
End Sub
Sub Essai()
VbaUnlock "Test1.xls", "Roudoudou"
Dim l&: l = Timer
While Timer < l + 1: DoEvents: Wend
Putfocus FindWindow(vbNullString, Application.Caption)
End Sub
Pour les références, tu peux peut être t'inspirer de ceci:
Sub ListRef()
GetProjectReferences ThisWorkbook.Name
End Sub
Private Sub GetProjectReferences(ByVal Wbk$)
Dim oRef As Object, sType$, i&
Workbooks.Add
For Each oRef In Workbooks(Wbk).VBProject.References
With oRef
i = i + 1
Cells(i, 1) = .Name & " " & .Major & "." & .Minor
Cells(i, 1).Font.Bold = True
If Not .IsBroken And .Description <> "" Then
i = i + 1: Cells(i, 2) = .Description
End If
If .BuiltIn Then sType = "Intégré (" Else sType = "Personnalisé ("
i = i + 1
Select Case .Type
Case 1: sType = sType & "Projet)"
Case 0: sType = sType & "TypeLib)"
End Select
If .IsBroken Then
sType = sType & " - Référence rompue"
Else
sType = sType & " - Référence intacte"
End If
Cells(i, 2) = sType
i = i + 1: Cells(i, 2) = .FullPath
If .Type = 0 Then: i = i + 1: Cells(i, 2) = .GUID
End With
i = i + 1
Next
Columns("A:A").ColumnWidth = 2
End Sub
MP
"Joel" a écrit dans le message de
news:cdtveu$mln$Bonjour (re LOL ) !
Une idée pour désactiver la protection du VBProject dans lequel la macro
s'exécute par macro... ?
Car il semble bien que si le projet est protégé, on ne puisse pas
supprimerune référence... toujours elles ;-)
Encore une fois Merci
--
Bien cordialement,
Joël GARBE
www.joelgarbe.fr