Welcome to VBForums

That line is not the only one that has a problem - the line before it has essentially the same problem (both of them together have another), and the way you set wddoc also has an issue.


As implied by Merri, the problem is that Selection (and ActiveDocument) are not valid in your VB program - they are sub-objects of Word, and can only be used without a prefix if you are using code inside the Word VBA editor (and even then it isn't recommended). Inside your VB code you must to prefix them with appropriate parent objects, eg:
Code:
   wdApp.ActiveDocument.Tables(1).Cell(2, 1).Select
   strSCOId = wdApp.Selection.Text
...as you have a variable for the document, the first line would be better like this:
Code:
   wddoc.Tables(1).Cell(2, 1).Select
Not specifying parent objects always creates problems to some degree, but they aren't always obvious like the error you got - most often you will get an extra hidden copy of Word running, which eats up memory, stops your code from running a second time, and might show a "save changes?" message when you shut down the computer.


As to the other two problems I referred to, they are based on what is Active or Selected. While code using those methods usually works, it does so more slowly, and when it fails it can cause massive problems (such as accidentally deleting all of the work the user has been doing for the last 5 hours).

It is surprisingly easy to avoid... in the case of Selection you basically remove the ".Select" from the end of one line, and the "x.Selection" from the next. For the code above, this:
Code:
   wddoc.Tables(1).Cell(2, 1).Select
   strSCOId = wdApp.Selection.Text
..becomes this:
Code:
   strSCOId = wddoc.Tables(1).Cell(2, 1).Text
As for what is Active, it depends on the situation... for the code above it was fairly obvious to replace wdApp.ActiveDocument with the variable wddoc , but others can be a bit tricky. In terms of the Set, you would merge the two lines:
Code:
    wdApp.Documents.Add frmStoryBoard.txtSrcWordDoc.Text, , , True
    Set wddoc = wdApp.ActiveDocument
...so that instead of creating a document and then storing whichever one happens to be active, it stores the one that was created:
Code:
    Set wddoc = wdApp.Documents.Add (frmStoryBoard.txtSrcWordDoc.Text, , , True)