|  
                                             
	Hallo Ros, 
	hab mal nen bischen aufgeräumt... 
	  
	  
Sub CommandButton1_Click()
 
   Dim Datei As Variant
   Dim Zeile As Double
   Dim vari As String
   Dim txt As String
   Dim spalte As Double
   Dim zeigen
 
   Datei = Application.GetSaveAsFilename("transl_report.txt", "txt-Datei,*.txt", , "Speichern des Reports")
 
   If Datei = False Then Exit Sub
   Open Datei For Output As #1
   Print #1, "' *****************************************************************************"
   Print #1, "' "
   Select Case i
      Case 1
         If Tabelle1.CheckBox1 = True Then 
            Print #1, "'               G E R M A N "
            spalte = 3 
         Else 
            GoTo weiter
         End If
      Case 2
         If Tabelle1.CheckBox2 = True Then 
            Print #1, "'               E N G L I S H "
            spalte = 4 
         Else 
            GoTo weiter
         End If
 
      Case 3
         If Tabelle1.CheckBox3 = True Then 
            Print #1, "'               F R E N C H "
            spalte = 5 
         Else 
            GoTo weiter
         End IF
   End Select
   Print #1, "' "
   Print #1, "' *****************************************************************************"
   Print #1, "' Last Change: "; (DateAdd("m", 1, Date))
   Print #1, "' Created by macro version 1.0, DJ "
   Print #1, "' *****************************************************************************"
   Print #1, "Sub lang_deutsch()"
   For Zeile = 4 To 47
      vari = Cells(Zeile, 2) & " = "
      If Cells(Zeile, spalte) = "" Then
         MsgBox "Die Spalte: " & spalte & " in Zeile: " & Zeile & " enthält keinen Wert" & vbCrLf _
         & "Export nicht komplett!!!", vbCritical, "+++ Warning +++ Warning +++ Warning +++"                                                                                          'gibt Fehlermeldung aus wenn zelle leer
      End If
      txt = "    " & vari & """" & Cells(Zeile, spalte) & """"                                                                                                                                                     'schreibanordnung
      Print #1, txt                                                                                                                                                                                                              'schreibt txt
   Next Zeile
   Print #1, "End Sub" & vbCrLf
    
weiter:
   'zeigen = Shell("C:\Program Files (x86)\Notepad++" & "\notepad++.exe " & Datei, 1)                                                                                                       'öffnet geschriebenes file mit notepad
   Exit Sub
  
End Sub
	Gruß 
     |