Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Searching and Then Copy Cell to word
Please Help!! I am Trying to search this sheet for TxtCaseName, Then Copy Cell 42 this is what it should say i think... am i doing something wrong?it gives me the error Object Variable not set :( Private Sub CmdPrint_Click() Dim sh As Worksheet Dim WrdApp As New Word.Application Dim wrdDoc As New Word.Document sh.Columns(1).Range("A5").Find(What:=TxtCaseName, LookIn:=xlFormulas).Offset(0, 42).Copy ' Create a new Word Document Set wrdDoc = WrdApp.Documents.Add(DocumentType:=wdNewBlankDocum ent) WrdApp.Visible = True WrdApp.Selection.Paste Set wrdDoc = Nothing Set WrdApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to copy the first word or two words from a cell containing a complete sentence to another cell | Excel Discussion (Misc queries) | |||
Copy Word cell containing Shift/Enter to Excel.Keep it as 1 cell | Excel Discussion (Misc queries) | |||
searching a cell for a contained text word | Charts and Charting in Excel | |||
Searching using part of a word rather than whole word in vba | Excel Programming | |||
Searching using part of a word rather than whole word in vba | Excel Programming |