Thema Datum  Von Nutzer Rating
Antwort
Rot Import & Auswertung von CSV/TXT Files mit VBA
14.02.2014 11:48:01 Tolis
NotSolved
14.02.2014 13:49:03 Gast15049
NotSolved
14.02.2014 14:51:49 Gast51863
NotSolved
14.02.2014 18:56:21 H27
NotSolved
15.02.2014 15:24:24 Tolis
NotSolved
17.02.2014 10:16:45 H27
NotSolved

Ansicht des Beitrags:
Von:
Tolis
Datum:
14.02.2014 11:48:01
Views:
2121
Rating: Antwort:
  Ja
Thema:
Import & Auswertung von CSV/TXT Files mit VBA

Hallo zusammen,

seit einigen Tagen beschäftige ich mich mit VBA in Excel, da ich im Rahmen einer Versuchsreihe eine relativ große Datenmenge in Form von csv und txt Files generiert habe und dies nun auswerten möchte.

Ich habe in Summe 96 Versuche gefahren und für jeden Versuch jeweils 1 csv und 2 txt files generiert. Nun soll in einer Excel Datei jeder Versuch in einem separaten Tabellenblatt inkl. Diagramm importiert/ausgewertet werden. Ich habe hierzu bereits ein Makro (sehr einfach, bin ja Anfänger) geschrieben, welches auch funktioniert. Dieses Makro greift jedoch nur auf die Versuchsreihe zu, die ich innerhalb dieses Makros als Beispiel verwendet habe. Wie mache ich es, dass das Makro beginnend von Versuch 01 bis Versuch 96 alle Importe und die entsprechende Auswertung/Namensvergabe automatisch macht und die Versuche auch jeweils in ein neues Tabellenblatt ablegt?

Das entsprechende (sehr lange) Makro habe ich angefügt und hoffe bzw. bitte um Hilfe...

Vielen Dank,

Gruß Tolis

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
Sub Import_Messdaten()
'
' Import_Messdaten Makro
'
 
    With ActiveSheet.QueryTables.Add(Connection:= _
        "TEXT;E:\Streifenziehanlage\Versuche 21.01.2014\HBM-Daten\02.csv", Destination _
        :=Range("$A$2"))
        .Name = "02"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 850
        .TextFileStartRow = 1
        .TextFileParseType = xlDelimited
        .TextFileTextQualifier = xlTextQualifierDoubleQuote
        .TextFileConsecutiveDelimiter = False
        .TextFileTabDelimiter = True
        .TextFileSemicolonDelimiter = True
        .TextFileCommaDelimiter = False
        .TextFileSpaceDelimiter = False
        .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1)
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
    Range("A2:B2").Select
    Range("B2").Activate
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
    Range("C2:D2").Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
    Range("E2:F2").Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
    Range("A1:F1").Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Selection.Font.Size = 12
    Selection.Font.Bold = True
    ActiveCell.FormulaR1C1 = "Versuch_002"
    Columns("A:F").Select
    Range("A3").Activate
    Selection.ColumnWidth = 12
    Columns("G:G").Select
    Selection.ColumnWidth = 2
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 49407
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Range("H1").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
        "TEXT;E:\Streifenziehanlage\Versuche 21.01.2014\Aramis-Daten\SCHNITT-STREIFEN_002_point0.txt" _
        , Destination:=Range("$H$1"))
        .Name = "SCHNITT-STREIFEN_002_point0"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 850
        .TextFileStartRow = 1
        .TextFileParseType = xlDelimited
        .TextFileTextQualifier = xlTextQualifierDoubleQuote
        .TextFileConsecutiveDelimiter = True
        .TextFileTabDelimiter = True
        .TextFileSemicolonDelimiter = False
        .TextFileCommaDelimiter = False
        .TextFileSpaceDelimiter = True
        .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1)
        .TextFileDecimalSeparator = "."
        .TextFileThousandsSeparator = " "
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
    Range("I5:M14").Select
    Selection.Cut Destination:=Range("H5:L14")
    Range("H4").Select
    ActiveCell.FormulaR1C1 = "Stage"
    Range("I4").Select
    ActiveCell.FormulaR1C1 = "Time"
    Range("J4").Select
    ActiveCell.FormulaR1C1 = "phi_1"
    Range("K4").Select
    ActiveCell.FormulaR1C1 = "phi_2"
    Range("L4").Select
    ActiveCell.FormulaR1C1 = "Weg"
    Range("H2:L3").Select
    Range("H3").Activate
    Selection.ClearContents
    Range("H1:L1").Select
    Selection.ClearContents
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
    Selection.Font.Size = 12
    Selection.Font.Bold = True
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    ActiveCell.FormulaR1C1 = "Back -> Point 0"
    Columns("M:P").Select
    Selection.Delete Shift:=xlToLeft
    Columns("H:L").Select
    Range("H2").Activate
    Selection.ColumnWidth = 10
    Columns("M:M").Select
    Selection.ColumnWidth = 2
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 49407
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Range("I4:L100").Select
    Selection.NumberFormat = "0.00000"
    With ActiveSheet.QueryTables.Add(Connection:= _
        "TEXT;E:\Streifenziehanlage\Versuche 21.01.2014\Aramis-Daten\SCHNITT-STREIFEN_002_point1.txt" _
        , Destination:=Range("$N$1"))
        .Name = "SCHNITT-STREIFEN_002_point1"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 850
        .TextFileStartRow = 1
        .TextFileParseType = xlDelimited
        .TextFileTextQualifier = xlTextQualifierDoubleQuote
        .TextFileConsecutiveDelimiter = True
        .TextFileTabDelimiter = True
        .TextFileSemicolonDelimiter = False
        .TextFileCommaDelimiter = False
        .TextFileSpaceDelimiter = True
        .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1)
        .TextFileDecimalSeparator = "."
        .TextFileThousandsSeparator = " "
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
    Range("O5:S14").Select
    Selection.Cut Destination:=Range("N5:R14")
    Range("N4").Select
    ActiveCell.FormulaR1C1 = "Stage"
    Range("O4").Select
    ActiveCell.FormulaR1C1 = "Time"
    Range("P4").Select
    ActiveCell.FormulaR1C1 = "phi_1"
    Range("Q4").Select
    ActiveCell.FormulaR1C1 = "phi_2"
    Range("R4").Select
    ActiveCell.FormulaR1C1 = "Weg"
        Range("N2:R3").Select
    Selection.ClearContents
    Range("N1:R1").Select
    Selection.ClearContents
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
    Selection.Font.Size = 12
    Selection.Font.Bold = True
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    ActiveCell.FormulaR1C1 = "Pull -> Point 1"
    Columns("N:R").Select
    Range("N2").Activate
    Selection.ColumnWidth = 10
    Columns("S:V").Select
    Selection.Delete Shift:=xlToLeft
    Columns("S:S").Select
    Selection.ColumnWidth = 2
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 49407
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Rows("3:3").Select
    Selection.Delete Shift:=xlUp
    Range("O4:R100").Select
    Selection.NumberFormat = "0.00000"
    Range("U3").Select
    Sheets("Tabelle1").Select
    Sheets("Tabelle1").Name = "Versuch_002"
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(1).Name = "=""F_Back"""
    ActiveChart.SeriesCollection(1).XValues = "=Versuch_002!$A$4:$A$501"
    ActiveChart.SeriesCollection(1).Values = "=Versuch_002!$B$4:$B$501"
    ActiveChart.SeriesCollection(1).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(2).Name = "=""F_Pull"""
    ActiveChart.SeriesCollection(2).XValues = "=Versuch_002!$C$4:$C$501"
    ActiveChart.SeriesCollection(2).Values = "=Versuch_002!$D$4:$D$501"
    ActiveChart.SeriesCollection(2).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(3).Name = "=""phi1_p0"""
    ActiveChart.SeriesCollection(3).XValues = "=Versuch_002!$I$4:$I$56"
    ActiveChart.SeriesCollection(3).Values = "=Versuch_002!$J$4:$J$56"
    ActiveChart.SeriesCollection(3).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(4).Name = "=""phi2_p0"""
    ActiveChart.SeriesCollection(4).XValues = "=Versuch_002!$I$4:$I$56"
    ActiveChart.SeriesCollection(4).Values = "=Versuch_002!$K$4:$K$56"
    ActiveChart.SeriesCollection(4).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(5).Name = "=""phi1_p1"""
    ActiveChart.SeriesCollection(5).XValues = "=Versuch_002!$O$4:$O$56"
    ActiveChart.SeriesCollection(5).Values = "=Versuch_002!$P$4:$P$56"
    ActiveChart.SeriesCollection(5).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(6).Name = "=""phi2_p1"""
    ActiveChart.SeriesCollection(6).XValues = "=Versuch_002!$O$4:$O$56"
    ActiveChart.SeriesCollection(6).Values = "=Versuch_002!$Q$4:$Q$56"
    ActiveChart.SeriesCollection(6).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(7).Name = "=""Weg_p0"""
    ActiveChart.SeriesCollection(7).XValues = "=Versuch_002!$I$4"
    ActiveChart.SeriesCollection(7).XValues = "=Versuch_002!$I$4:$I$56"
    ActiveChart.SeriesCollection(7).Values = "=Versuch_002!$L$4:$L$56"
    ActiveChart.SeriesCollection(7).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(8).Name = "=""Weg_p1"""
    ActiveChart.SeriesCollection(8).XValues = "=Versuch_002!$O$4:$O$56"
    ActiveChart.SeriesCollection(8).Values = "=Versuch_002!$R$4:$R$56"
    ActiveChart.SeriesCollection(8).Select
    With Selection.Format.Line
        .Visible = msoTrue
        .Weight = 1.5
    End With
    ActiveSheet.ChartObjects("Diagramm 1").Activate
    ActiveChart.SeriesCollection(6).Select
    ActiveChart.SeriesCollection(6).AxisGroup = 2
    ActiveSheet.ChartObjects("Diagramm 1").Activate
    ActiveChart.SeriesCollection(5).Select
    ActiveChart.SeriesCollection(5).AxisGroup = 2
    ActiveSheet.ChartObjects("Diagramm 1").Activate
    ActiveChart.SeriesCollection(4).Select
    ActiveChart.SeriesCollection(4).AxisGroup = 2
    ActiveSheet.ChartObjects("Diagramm 1").Activate
    ActiveChart.SeriesCollection(3).Select
    ActiveChart.SeriesCollection(3).AxisGroup = 2
    ActiveSheet.ChartObjects("Diagramm 1").Activate
    ActiveChart.Axes(xlValue, xlSecondary).Select
    ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = 0.3
    ActiveChart.Axes(xlValue, xlSecondary).MinimumScale = -0.2
    ActiveChart.Axes(xlValue, xlSecondary).MajorUnit = 0.1
    Selection.TickLabels.NumberFormat = "0.00"
    ActiveChart.Axes(xlValue).Select
    ActiveChart.Axes(xlValue).MinimumScale = 0
    ActiveChart.Axes(xlValue).MaximumScale = 50
    ActiveChart.Axes(xlValue).MajorUnit = 10
    ActiveChart.Axes(xlCategory).Select
    ActiveChart.Axes(xlCategory).MinimumScale = 0
    ActiveChart.Axes(xlCategory).MaximumScale = 5
    ActiveChart.ApplyLayout (1)
    ActiveChart.Axes(xlValue).MajorGridlines.Select
    Selection.Delete
    ActiveSheet.ChartObjects("Diagramm 1").Activate
    ActiveChart.PlotArea.Select
    With Selection.Format.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 0, 0)
    End With
     
'x-Achse
 
    ActiveChart.Axes(xlCategory).AxisTitle.Select
    ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = "Zeit [sec]"
    Selection.Format.TextFrame2.TextRange.Characters.Text = "Zeit [sec]"
    With Selection.Format.TextFrame2.TextRange.Characters(1, 10).ParagraphFormat
        .TextDirection = msoTextDirectionLeftToRight
        .Alignment = msoAlignCenter
    End With
    With Selection.Format.TextFrame2.TextRange.Characters(1, 10).Font
        .BaselineOffset = 0
        .Bold = msoTrue
        .NameComplexScript = "+mn-cs"
        .NameFarEast = "+mn-ea"
        .Fill.Visible = msoTrue
        .Fill.ForeColor.RGB = RGB(0, 0, 0)
        .Fill.Transparency = 0
        .Fill.Solid
        .Size = 10
        .Italic = msoFalse
        .Kerning = 12
        .Name = "+mn-lt"
        .UnderlineStyle = msoNoUnderline
        .Strike = msoNoStrike
    End With
     
' Primäre y-Achse
     
    ActiveChart.Axes(xlValue).AxisTitle.Select
    ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = "Kraft [kN]" & Chr(13) & "Weg [mm]"
    Selection.Format.TextFrame2.TextRange.Characters.Text = "Kraft [kN]" & Chr(13) & "Weg [mm]"
    With Selection.Format.TextFrame2.TextRange.Characters(1, 11).ParagraphFormat
         .TextDirection = msoTextDirectionLeftToRight
         .Alignment = msoAlignCenter
    End With
    With Selection.Format.TextFrame2.TextRange.Characters(1, 11).Font
         .BaselineOffset = 0
         .Bold = msoTrue
         .NameComplexScript = "+mn-cs"
         .NameFarEast = "+mn-ea"
         .Fill.Visible = msoTrue
         .Fill.ForeColor.RGB = RGB(0, 0, 0)
         .Fill.Transparency = 0
         .Fill.Solid
         .Size = 10
         .Italic = msoFalse
         .Kerning = 12
         .Name = "+mn-lt"
         .UnderlineStyle = msoNoUnderline
         .Strike = msoNoStrike
    End With
    With Selection.Format.TextFrame2.TextRange.Characters(12, 8).ParagraphFormat
        .TextDirection = msoTextDirectionLeftToRight
        .Alignment = msoAlignCenter
    End With
    With Selection.Format.TextFrame2.TextRange.Characters(12, 8).Font
        .BaselineOffset = 0
        .Bold = msoTrue
        .NameComplexScript = "+mn-cs"
        .NameFarEast = "+mn-ea"
        .Fill.Visible = msoTrue
        .Fill.ForeColor.RGB = RGB(0, 0, 0)
        .Fill.Transparency = 0
        .Fill.Solid
        .Size = 10
        .Italic = msoFalse
        .Kerning = 12
        .Name = "+mn-lt"
        .UnderlineStyle = msoNoUnderline
        .Strike = msoNoStrike
    End With
     
' Sekundäre y-Achse
     
    ActiveChart.ChartArea.Select
    ActiveChart.SetElement (msoElementSecondaryValueAxisTitleRotated)
    ActiveChart.Axes(xlValue, xlSecondary).AxisTitle.Text = "phi [-]"
    Selection.Format.TextFrame2.TextRange.Characters.Text = "phi [-]"
    With Selection.Format.TextFrame2.TextRange.Characters(1, 7).ParagraphFormat
        .TextDirection = msoTextDirectionLeftToRight
        .Alignment = msoAlignCenter
    End With
    With Selection.Format.TextFrame2.TextRange.Characters(1, 7).Font
        .BaselineOffset = 0
        .Bold = msoTrue
        .NameComplexScript = "+mn-cs"
        .NameFarEast = "+mn-ea"
        .Fill.Visible = msoTrue
        .Fill.ForeColor.RGB = RGB(0, 0, 0)
        .Fill.Transparency = 0
        .Fill.Solid
        .Size = 10
        .Italic = msoFalse
        .Kerning = 12
        .Name = "+mn-lt"
        .UnderlineStyle = msoNoUnderline
        .Strike = msoNoStrike
    End With
 
' Diagramm: Größe ändern und positionieren
     
    ActiveSheet.Shapes("Diagramm 1").ScaleWidth 1.5, msoFalse, _
        msoScaleFromTopLeft
    ActiveSheet.Shapes("Diagramm 1").ScaleHeight 1.75, msoFalse, _
        msoScaleFromTopLeft
    ActiveChart.Parent.Cut
    ActiveSheet.Paste
     
     
' Diagramm-Titel
 
    ActiveChart.SetElement (msoElementChartTitleCenteredOverlay)
    ActiveChart.ChartTitle.Text = "Versuch_002"
    Selection.Format.TextFrame2.TextRange.Characters.Text = "Versuch_002"
    With Selection.Format.TextFrame2.TextRange.Characters(1, 11).ParagraphFormat
        .TextDirection = msoTextDirectionLeftToRight
        .Alignment = msoAlignCenter
    End With
    With Selection.Format.TextFrame2.TextRange.Characters(1, 11).Font
        .BaselineOffset = 0
        .Bold = msoTrue
        .NameComplexScript = "+mn-cs"
        .NameFarEast = "+mn-ea"
        .Fill.Visible = msoTrue
        .Fill.ForeColor.RGB = RGB(0, 0, 0)
        .Fill.Transparency = 0
        .Fill.Solid
        .Size = 18
        .Italic = msoFalse
        .Kerning = 12
        .Name = "+mn-lt"
        .UnderlineStyle = msoNoUnderline
        .Strike = msoNoStrike
    End With
    Selection.Format.Fill.Visible = msoFalse
    Selection.Format.Line.Visible = msoFalse
    Selection.Left = 185
    Selection.Top = 18
    Range("U30").Select
End Sub

 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot Import & Auswertung von CSV/TXT Files mit VBA
14.02.2014 11:48:01 Tolis
NotSolved
14.02.2014 13:49:03 Gast15049
NotSolved
14.02.2014 14:51:49 Gast51863
NotSolved
14.02.2014 18:56:21 H27
NotSolved
15.02.2014 15:24:24 Tolis
NotSolved
17.02.2014 10:16:45 H27
NotSolved