Thursday, 15 January 2015

excel - Cells.Find() Raises "Runtime Error 91: Object Variable or With Block Not Set" -


What do I need: I have many sheets in different devices Let's get one of these sheets Call "WS1".

And I have got a separate sheet with all the current device and the appropriate OS. This one we call "list".

Now I want other sheets (such as "WS1") to check "list", find the right device, and copy the correct OS to the WS1 sheet.

Will be manual:

  • Choose "W3" cell and copy "W3".
  • Open "list" - find sheet and copied entry
  • Select the left cell from the entry and copy it
  • Repeat the WS Open 1, select the cell next to the active cell and paste it to the new clipboard (which includes the OS)
  • Select the bottom cell and the next cell on the active cell.
  • As long as there is no device in the WS1

What's with me so far:

  New MSForms.DataObject Dim strCliBoa as the dim databobase as .. Select the string 'strCliBoa = DataObj.GetText DataObj.GetFromClipboard Range ("C3") Select Selection.Copy strCliBoa = DataObj.GetText Sheet ("List") Select range ("A1"). Do: = = strCliBoa, after: = activecel, looking: = xlFormulas, _ lookAt: = xlPart, SearchOrder: = xlByRows, SearchDirection: = xlNext, _ MatchCase: = true, SearchFormat: = false) .Activate ActiveCell .Offset (0, -1) .Select Selection.Copy strCliBoa = DataObj.GetText Sheets ("WS1"). Choose ActiveCell.Offset (0, -1). Select ActiveSheet.Paste ActiveCell.Offset (1, 1). My problem:  "Runtime Error 91: Object is not set with variable or block variable" and it marks cells Remove-method  

Can anyone tell me what I am doing wrong? ^^ Thanks in advance!

(Oh, almost forgot: I'm using MS Excel 2010 on Win7)

If you are not able to find the string you are looking for, then you will get the error search function returns" nothing "if nothing is found

  form of slow R Set the limits in r = Cells.find (what: = after strCliBoa,: = ActiveCell, looking: = xlFormulas, _ lookAt: = xlPart, SearchOrder: = xlByRows, SearchDirection: = xlNext, _ MatchCase: = this is true , SearchFormat: = false) if r is nothing then 's Ferret error or "fill in your address and  

No comments:

Post a Comment