title: VBA to copy and rename file that user choose in dialog
body: <p>I need this VBA macro that lets the user choose a PDF file from their own folder and then the macro should copy the PDF to a fixed folder destination and rename the file based on two values chosen in ComboBoxes. </p>
  
  <p>I have tried the following code, but fails at the last sentence. Anybody who can help me? </p>
  
  <pre><code>Sub add_testrepport()
     Dim intChoice As Integer
     Dim strPath As String
  
     'allow the user to select one file
     Application.FileDialog(msoFileDialogOpen).AllowMultiSelect = False
  
     'make the file dialog visible to the user
     intChoice = Application.FileDialog(msoFileDialogOpen).Show
  
     'determine what choice the user made
     If intChoice &lt;&gt; 0 Then
  
        'get the file path selected by the user
         strPath = Application.FileDialog( _
           msoFileDialogOpen).SelectedItems(1)
  
        'copy the file path to filecopy
        FileCopy strPath, "K:\05_RAP\Klement\Test"
     End If
  End Sub
  </code></pre>