I go through a worksheet in a loop, and copy the content of a specific cell to a Variable (String). When run in debug mode the variable, in some cases, seems to be empty, although there actually is content in the cell. Also when the variable is copied to another variable this variable shows empty. However, when I show the variable in a message box it does show the correct content. Also strange: when I check the content length using Len(Range("B2") I get the correct figure. It makes no difference if I use e.g Range("B3") or Cells(3,2), The behavior seems to fully depend of the cell content: When the cell content is e.g. 'PL' the variable is correctly filled, when the value is 'PLZ' I get a blank/empty result.
This issue causes serious problems for me, as I have no workaround, and it makes a large VBA script unreliable as it occurs at totally unexpected moments. I would be very grateful for any suggestions!
Note: I use the latest version of Excel as part of O365, running on Windows10
Thanks, Theo