Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
172to176
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
172to176
172to176
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Formatieren

Formatieren
22.10.2002 14:52:01
andre06
Hallo,
ich habe mit folgendem Code ein kleines Problem und zwar handelt es sich bei diesen AP um Pivotabellen nun möchte ich beim aktivieren und ausdrucken die Spaltenbreite von D - I auf eine Breite von 11 gestellt bekommen und Spalte C linksbündig.Bis jetzt stellen sich die Spalten bei einer Aktualisierung selber ein, wo müsste ich was einbauen ??


Private Sub CommandButton2_Click()
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then Sheets(ListBox1.List(i)).PrintOut Copies:=1, Collate:=True
Next
End Sub
Private Sub CommandButton3_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim i As Integer
Dim Blatt
For Each Blatt In Sheets
ListBox1.AddItem Blatt.Name
Next
End Sub
Private Sub ListBox1_Click()
Rem Called when user selects an item from the list.
' It simply displays the type of sheet selected in a label named "Label1".
' Also the selected sheet from the listbox is activated.
Dim intSelected As Integer
Dim strGetType As String
On Error Resume Next
If Me.ListBox1.ListCount > 0 Then
intSelected = Me.ListBox1.ListIndex
strGetType = TypeName(ActiveWorkbook.Sheets(intSelected + 1))
' If it's a Worksheet, refine the type.
If strGetType = "Worksheet" Then
Select Case ActiveWorkbook.Sheets(intSelected).Type
Case xlWorksheet: strGetType = "Worksheet"
Case xlExcel4MacroSheet: strGetType = "XL4 Macro Sheet"
Case xlExcel4IntlMacroSheet: strGetType = "XL$ Intl Macro Sheet"
End Select
End If
' Place the text in the dialog box label.
Me.Label1 = strGetType
End If
If Me.ListBox1.ListCount > 0 Then
ActiveWorkbook.Sheets(Me.ListBox1.ListIndex + 1).Activate
End If
End Sub


mfG Andre

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Re: Formatieren
25.10.2002 10:08:31
Otto
Hallo Andre,

was hältst Du von

Gruß Otto

Re: Formatieren
25.10.2002 10:56:38
Andre06
Danke funktioniert super!

Gruß Andre

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige