Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VB + Excel + Mehrere Blätter....

Empfohlene Antworten

Wenns dir allerdings die ganze Zeit nur darum ging, aus ein paar Tabellen ein paar CSV Dateien zu generieren, dann haettest wahrscheinlich viel schneller die CSV`s selbst ausm VBA raus geschrieben :D

Goos

  • Autor
Original geschrieben von Goos

Wenns dir allerdings die ganze Zeit nur darum ging, aus ein paar Tabellen ein paar CSV Dateien zu generieren, dann haettest wahrscheinlich viel schneller die CSV`s selbst ausm VBA raus geschrieben :D

Goos

Aber nicht bei 7 Exceldatein à 19 Tabellen und das fast jeden Tag...:P :eek: :(
  • Autor
Original geschrieben von Goos

Nuja.....du hast dich sicher irgendwo nur vetippselt :)

Goos

Ich weiß nicht...

hier noch mal der aktuelle Code....

Private Sub cmdBTOK_Click()

    Dim iPages As Integer

    Dim iTmp As Integer

    Dim iTmp2 As Integer

    Dim iZaehler As Integer

    Dim iLength As Integer

    Dim strTmp As String

    Dim strTmp2 As String

    Dim strFileName As String

    Dim wrkBookNeu As Workbook

    Dim wrkBookOrg As Workbook

    If txtBoxUserName.TextLength < 1 Then

        MsgBox ("Kein Username eingegeben!")

        GoTo cmdBTOK_Click_Ende

    End If

    If txtBoxUserPasswort.TextLength < 1 Then

        MsgBox ("Kein Passwort eingegeben!")

        GoTo cmdBTOK_Click_Ende

    End If

    If txtBoxServer.TextLength < 1 Then

        MsgBox ("Kein Datenbankserver eingegeben!")

        GoTo cmdBTOK_Click_Ende

    End If

    Application.DisplayAlerts = False

    Set wrkBookOrg = Application.ActiveWorkbook

    iPages = ActiveWorkbook.Worksheets.Count

    For iTmp = 1 To iPages

        Set wrkBookNeu = Application.Workbooks.Add

        Do While (wrkBookNeu.Worksheets.Count > 1)

            wrkBookNeu.ActiveSheet.Delete

        Loop

        wrkBookOrg.Sheets(iTmp).Copy after:=wrkBookNeu.Sheets(1)

        wrkBookNeu.Sheets("Tabelle3").Delete

        strFileName = wrkBookNeu.ActiveSheet.Name

        iLength = Len(strFileName)

        For iZaehler = 1 To iLength

            'Überprüfung der einzelnen Zeichen

            strTmp = Mid(strFileName, iZaehler, 1)

            If strTmp < Chr$(33) Then

                strTmp = "_"

            End If

            If strTmp = "<" Or strTmp = ">" Or strTmp = "/" Or strTmp = "\" Then

                strTmp = "-"

            End If

            strTmp2 = strTmp2 + strTmp

            strTmp = ""

        Next iZaehler

        'iwrkBookNeu.SaveAs(strTmp2, xlCSV)

        wrkBookNeu.Close

        strTmp2 = ""

        strTmp = ""

    Next iTmp

    Application.DisplayAlerts = True

    End

cmdBTOK_Click_Ende:


End Sub

Bei iwrkBookNeu.SaveAs(strTmp2, xlCSV) hängt er sich immer auf...

Original geschrieben von Hexagon

Aber nicht bei 7 Exceldatein à 19 Tabellen und das fast jeden Tag...:P :eek: :(

Nene ich hab doch gemeint ne kleine VBA Funktion um die Werte so als CSV zu schreiben.

Is ja kein Problem ne kleine Text Datei zu schreiben und zwischendurch ein paar Kommas einzufuegen :)

Goos

...ach und *lach* :OD

Wir hattens doch schon davon, dass es VBA heisst und nicht VCA ;)

...also versuch mal iwrkBookNeu.SaveAs FileName:=strTmp2, FileFormat:=xlCSV

Goos

...ne du drafst eigentlich nimmer nerven *g* :D

aber nimm mal das da:


Sub addtoolbar()
Const tBarName As String = "MyBar"
On Error Resume Next
CommandBars(tBarName).Delete
On Error GoTo 0
CommandBars.Add Name:=tBarName
With CommandBars(tBarName)
With .Controls.Add(ID:=1)
.Style = msoButtonCaption
.OnAction = "AddInfo"
.Caption = "Test"
End With
.Visible = True
End With
End Sub[/PHP]

Goos

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.