title: Run-time error '-2147418113 (8000ffff)': Automation Error
body: <p>My code is running perfectly until get to "If c = "" Then". At this point the run time error  <strong>'-2147418113 (8000ffff)': Automation Error</strong> is raised. I have put an On Error Resume Next statement to check if everything goes right if I skip this line and it does.  I really don't understand what this error means and I wasn't able to find useful information about it. Could someone bring light to this problem? I have tried to change <strong>"If c = "" Then" to "If len(c.value)=0 Then"</strong> but it raises the same error. All the variables in AddresRawDataFile are defined as public (as range) and they were set to range in a different module, called PublicVariable, which is called by every procedure. </p>
  
  <pre><code>Private Sub CommandButton3_Ok_Click()
  
      Dim MsgAlert As String
      Dim MsgBoxAlert As Variant 'Message box for for many checks done below
      Dim c As Variant 'Variable used in a for each structure
      Dim AddressRawDataFile As Variant 'Array of variables with address in Box2_UPb_Options
  
      'Code to assign values from Box2_UPb_Options to the related variables
  
      AddressRawDataFile = Array(RawHg202Range, RawPb204Range, RawPb206Range, RawPb207Range, RawPb208Range, RawTh232Range, RawU238Range, _
      RawHg202Header, RawPb204HeaderRange, RawPb206HeaderRange, RawPb207HeaderRange, RawPb208HeaderRange, RawTh232HeaderRange, _
      RawU238HeaderRange)
  
  
      'All of the above variables must not be = ""
      For Each c In AddressRawDataFile
          'On Error Resume Next
          If c = "" Then
              MsgBoxAlert = MsgBox("There are one or more addresses missing in Start-AND-Options sheet. " &amp; _
              "Please, check it.", vbOKOnly, "Missing Address")
                  Load Box2_UPb_Options
                      Box2_UPb_Options.MultiPage1.Value = 2
                          Box2_UPb_Options.Show
          End If
      Next
  </code></pre>