ich habe da ein Problem. Ich möchte verweise setzen beim öffnen einer Datei. Leider bekomme ich es nicht hin. Hier der Code erstmal:
Private Sub Workbook_Open()
Dim a As Long
Dim str_foundfile As String
'On Error Resume Next
With Application.FileSearch
.NewSearch
.LookIn = "c:/"
.SearchSubFolders = True
.Filename = "*.tlb"
.Execute
For a = 1 To .FoundFiles.Count
str_foundfile = .FoundFiles(a)
If Right(str_foundfile, 11) = "notes32.tlb" Or Right(str_foundfile, 10) = "domobj.tlb" Then
Application.VBE.ActiveVBProject.References.AddFromFile (str_foundfile)
End If
Next
End With
End Sub
Ich hoffe ihr könnt mir da helfen.
Gruß
Dominic