tüftle schon den ganzen Abend an folgendes Problem:
Ich möchte gern u.a. ein Diagramm aus einer anderen Datei in meine Userform einlesen aber wie? Der zweite Teil im code...
Private Sub UserForm_Activate()
Dim Dateiname
Workbooks.Open Filename:="W:\T03-Private_Banking\@Berenberg Private Capital\Strukturierte _
_
_
Investments\Track_Record.xls."
With Worksheets("M-rix wöchentl.")
TextBox_NAV = .Cells(IIf(IsEmpty(.Cells(.Rows.Count, 2)), .Cells(.Rows.Count, 2).End( _
xlUp).Row, .Rows.Count), 2)
TextBox_Date = .Cells(IIf(IsEmpty(.Cells(.Rows.Count, 1)), .Cells(.Rows.Count, 1).End( _
_
_
xlUp).Row, .Rows.Count), 1)
TextBox_MTD = .Cells(IIf(IsEmpty(.Cells(.Rows.Count, 4)), .Cells(.Rows.Count, 4).End( _
xlUp).Row, .Rows.Count), 4)
TextBox_YTD = .Cells(IIf(IsEmpty(.Cells(.Rows.Count, 5)), .Cells(.Rows.Count, 5).End( _
xlUp).Row, .Rows.Count), 5)
TextBox_Vola = .Cells(IIf(IsEmpty(.Cells(.Rows.Count, 6)), .Cells(.Rows.Count, 6).End( _
_
_
xlUp).Row, .Rows.Count), 6)
End With
Set Diagramm = Sheets("M-rix wöchentl.").ChartObjects(1).Chart
Diagramm.Parent.Width = Image1.Width
Diagramm.Parent.Height = Image1.Height
Dateiname = ThisWorkbook.Path & Application.PathSeparator & "diagramm.gif"
Diagramm.Export Filename:=Dateiname, FilterName:="GIF"
Image1.Picture = LoadPicture(Dateiname)
Workbooks("Track_Record.xls").Close savechanges:=False
End Sub
Danke für Eure Hilfe
Gruß
Matthias