title: Getting ActiveCell value in excel FROM word macro
body: <p>I am trying to manipulate an excel workbook from word. Everything was working quite well until all of a sudden I couldn't get a response from ActiveCell.Value</p>
  
  <p>The problem is happening all the way at the bottom of this block of code where I try to show the value in a msgbox but no msgbox comes up.</p>
  
  <p>The previous commands such as:</p>
  
  <pre><code>worksheetJobs.Activate
  </code></pre>
  
  <p>and</p>
  
  <pre><code>.Cells(1500, fichierColumn).Select
  </code></pre>
  
  <p>are working fine.</p>
  
  <p>The weird thing is that I was working on this (there is a whole block of code that comes AFTER what I have posted) and then all of a sudden I couldn't get even this very basic thing to respond...</p>
  
  <pre><code>    Dim excelObj As Excel.Application
      Dim oWB As Excel.Workbook
  
      'If Excel is running, get a handle on it; otherwise start a new instance of Excel
      On Error Resume Next
      Set excelObj = GetObject(, "Excel.Application")
  
      If Err Then
          MsgBox "excel is not running"
          Set excelObj = New Excel.Application
          excelObj.Visible = True
  
          On Error GoTo Err_Handler
          Set oWB = excelObj.Workbooks.Open(Filename:=todoWorkbook)
  
      Else
          MsgBox "excel is running"
          Dim wb As Workbook
          For Each wb In excelObj.Workbooks
              If wb.Name = toDoName Then
                  Set oWB = wb
                  Exit For
              End If
          Next wb
      End If
  
      MsgBox oWB.Name
  
      Dim fichierColumn As Integer
      Dim outMots As Integer
      Dim outLignes As Integer
      Dim langOut As Integer
  
      fichierColumn = 5
      outMots = 17
      outLignes = 18
      langOut = 9
  
      Dim worksheetJobs As Excel.Worksheet
      Set worksheetJobs = oWB.Worksheets("Liste jobs")
      worksheetJobs.Activate
  
      With worksheetJobs
          .Cells(1500, fichierColumn).Select
          Dim tempStr As String
  
          tempStr = ActiveCell.Value
          MsgBox tempStr
  
      End With
  
      'Set excelObj = Nothing
      'Set oWB = Nothing
      Exit Sub
  
  Err_Handler:
     MsgBox todoWorkbook &amp; " caused a problem. " &amp; Err.Description, vbCritical, _
         "Error: " &amp; Err.Number
  
  End Sub
  </code></pre>