how do i debug my program? error description "Run time error '91':" Object variable or With block variable not set


Here is my Code:

VB Code:
  1. Private Sub Command1_Click()
  2.  
  3. Dim objWdApp As Word.Application
  4. Dim objWdRange As Word.Range
  5. Dim objWdDoc As Word.Document
  6.  
  7. Dim count As Integer
  8. Dim wdText As String
  9.  
  10. count = 0
  11. wdText = Text1.Text
  12.  
  13. Set objWdRange = objWdDoc.Content
  14. With objWdRange.Find
  15.      
  16.  Do While .Execute(FindText:=wdText, Format:=False) = True
  17.     count = count + 1
  18.  Loop
  19.  
  20.  
  21. End With
  22. MsgBox "There are " & count + "words", vbInformation
  23. Set objWdRange = Nothing
  24. End Sub


your help is very much appreciated. thanks in advance.