habe ein kleines Problem mit einem Hyperlink. Ich möchte gerne ein Excel File über ein Hyperlink öffnen und dieses Workbook dann aktivieren. Also das öffnen funktioniert, aber irgendwie bleib ich im alten Workbook. Das ganze mach ich um per Makro automatisch bestimmte Bereiche aus dem per Hyperlink geöffneten Workbook in das alte Workbook zu kopieren. Hoffe es kann mir jemand weiterhelfen. Danke
Grüße aus Stuttgart
Sebastian
Hier mal mein Code:
For i = 16 To Cells(Rows.Count, 17).End(xlUp).Row
If wks1.Cells(i, 9) = "" Then
GoTo ENDE
Else
sFile = wks1.Cells(i, 9)
sBlatt = wks1.Cells(i, 3)
Sheets(sBlatt).Visible = True
Sheets(sBlatt).Rows("1:1000").Delete Shift:=xlUp
Sheets(sBlatt).Activate
ActiveWindow.Zoom = 75
wks1.Cells(i, 9).Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
wkb2 = ***HIER BRÄUCHTE ICH IRGENDWIE DEN NEUEN WORKBOOK NAMEN***
With Workbooks(wkb1).Sheets(sBlatt)
Set Bereich1 = Workbooks(wkb2).Sheets("Consolidation").Range("Nomi_List_Consolidation")
Set Bereich2 = Workbooks(wkb1).Sheets(sBlatt).Cells(1, 1)
Workbooks(wkb2).Activate
Sheets("Consolidation").Select
Bereich1.Select
Selection.Copy
Workbooks(wkb1).Activate
Sheets(sBlatt).Select
With Bereich2
.Insert Shift:=xlDown
End With
End With
Next i