EXCEL VBA CODE

GAILBAKER
GAILBAKER used Ask the Experts™
on
Hi

How do I write VBA code for this please:

Domestic<space>Airlines<Alt+Enter>LIST

(note: it could have a space after the word Airlines if necessary)

Many thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010
Commented:
If you are trying to write that to a cell:

Range("a1") = "Domestic Airlines" & Chr(10) & "LIST"
Rows(1).AutoFit

Open in new window

Author

Commented:
Many thanks Patrick - it worked:

Sub X()
'
' X Macro
'

'
        Cells.Find(What:="DOMESTIC AIRLINES" & Chr(10) & "LIST", After:=ActiveCell, LookIn:= _
        xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:= _
        xlNext, MatchCase:=False, SearchFormat:=False).Activate
End Sub

Best wishes, Gail
Top Expert 2010

Commented:
Glad to help :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial