title: Submit button to other workbook
body: <p>Im making a new excel template where the managers can add info so that we can make a quote based on their template. The meaning is that if they are clicking on the submit button that depending on the value segment gos to the correct excel file (follow up list) and that the customer name, customer id and general info put in the follow up list.</p>
  
  <p>This is de code that i have until now, only thing is the submit button that i need to have.</p>
  
  <pre><code>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Intersect(Target, Range("B7")) Is Nothing Then
      If Range("B7") &lt;&gt; "Server &amp; Storage" And Range("B7") &lt;&gt; "Power" And Range("B7") &lt;&gt; "Networking" And Range("B7") &lt;&gt; "Software" And Range("B7") &lt;&gt; "Printing" Then
          MsgBox "Selecteer een value segment!"
      End If
  Else
      Exit Sub
  End If
  
  End Sub
  'E-mail knop
   Private Sub CommandButton1_Click()
  
  Dim xOutApp As Object
  Dim xOutMail As Object
  Dim xMailBody As String
  Dim srtEmail As String
  On Error Resume Next
  Set xOutApp = CreateObject("Outlook.Application")
  Set xOutMail = xOutApp.CreateItem(0)
  xMailBody = "Hi Team," &amp; vbNewLine &amp; vbNewLine &amp; _
            "Dit is een nieuwe request voor " &amp; Range("B8")
  
  If Range("B7") = "Server &amp; Storage" Then
      srtEmail = "hardware@bechtle.be"
  Else
      If Range("B7") = "Power" Then
          srtEmail = "hardware@bechtle.be"
      Else
          If Range("B7") = "Networking" Then
           srtEmail = "networking@bechtle.be"
           Else
              If Range("B7") = "Software" Then
               srtEmail = "software@bechtle.be"
                Else
                    If Range("B7") = "Printing" Then
                      srtEmail = "kristof.neubauer@bechtle.com"
                    Else
                      MsgBox "Geen value segment geselecteerd!"
                  End If
              End If
          End If
      End If
  End If
                On Error Resume Next
  With xOutMail
  
      .To = srtEmail
      .CC = "berty.vaneijgen@bechtle.com"
      .BCC = ""
      .Subject = "Value Request voor " &amp; Range("B9") &amp; Range("B8")
      .Body = xMailBody
  
  If Range("B7") &lt;&gt; "" Then
      .Display   'or use .Send
  End If
  End With
  On Error GoTo 0
  Set xOutMail = Nothing
  Set xOutApp = Nothing
  End Sub
  'Reset knop
   Private Sub CommandButton2_Click()
    Sheets("VRT").Range("B7:B33") = ""
    MsgBox "Velden zijn gewist!"
  
    End Sub
    'Save as knop
   Private Sub CommandButton3_Click()
    Dim nom As String
    nom = Day(Date) &amp; "-" &amp; Month(Date) &amp; "-" &amp; Year(Date) &amp; " " &amp; Range("B8")
     ActiveWorkbook.SaveCopyAs ActiveWorkbook.Path &amp; "\" &amp; nom &amp; ".xlsm"
     rep = MsgBox("Je bestand is opgeslagen! ", vbYes + vbInformation, "Copy  of spreadsheet")
  
    'MsgBox(You database has been saved  : " &amp; Name, vbYes +         vbInformation, "Copy of spreadsheet")
   End Sub
    'print
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
     Cancel = (ActiveSheet.Name = "VRT")
    If Cancel = True Then MsgBox "Gebruik de print knop."
  
   End Sub
      'print knop
    Private Sub CommandButton4_Click()
   On Error Resume Next
     Application.EnableEvents = False
      With ActiveWorkbook.Sheets("VRT")
              .Range("A1:F33").PrintOut
      End With
     Application.EnableEvents = True
     On Error GoTo 0
      End Sub
  
   Private Sub CommandButton5_Click()
  
   End Sub
  </code></pre>