title: VBA InStr always returning 0
body: <p>I am using Excel 2010 and trying to make a function which will replace a part of the links in the Worksheet, depending on the user input. More specific I trying to replace the links to match the users Dropbox location. </p>
  
  <p>This is the code I have so far</p>
  
  <pre><code>Private Sub CommandButton1_Click()
  
  Dim DropboxFolder As String
  Dim SearchFor As String
  Dim SearchPos As Integer
  
  SearchFor = "Dropbox"
  
  With Application.FileDialog(msoFileDialogFolderPicker)
  .AllowMultiSelect = False
  .Show
  On Error Resume Next
  DropboxFolder = .SelectedItems(1)
  For Each theHyperLink In ActiveSheet.Hyperlinks
    SearchPos = InStr(0, SearchFor, theHyperLink.Address, vbBinaryCompare)
    theHyperLink.Address = DropboxFolder
    Next
  Err.Clear
  On Error GoTo 0
  End With
  
  End Sub
  </code></pre>
  
  <p>I have tried a debugging the code, and added a breakpoint at</p>
  
  <pre><code>SearchPos = InStr(0, SearchFor, theHyperLink.Address, vbBinaryCompare) 
  </code></pre>
  
  <p>The SearchFor is <code>"Dropbox"</code>  and TheHyperLink.Address is <code>"..\Dropbox\Salgdanmarks Salgsakademi\1\Ny Microsoft Word Document.docx"</code></p>
  
  <p>But the SearchPos is set to <code>0</code></p>
  
  <p>What am I doing wrong? </p>