Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write code for find a word in excel?
For example , there is two textbox and one command button.
If i press the command button the text entered in the first textbox will find in xlworkbook and shown in second textbox with a msgbox ? All sugestions are welcomed. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write code for find a word in excel?
Attach the following macro to a Forms button:
Sub mx_sub() Dim s As String, t As String t = Chr(10) & Chr(10) s = Application.InputBox("Enter the Word: ") For Each r In ActiveSheet.UsedRange With r If InStr(1, .Value, s) 0 Then MsgBox ("Found the Word in cell " & .Address & t & .Value) Exit Sub End If End With Next MsgBox ("Did not find the Word") End Sub -- Gary''s Student - gsnu2007 "Mx" wrote: For example , there is two textbox and one command button. If i press the command button the text entered in the first textbox will find in xlworkbook and shown in second textbox with a msgbox ? All sugestions are welcomed. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write code for find a word in excel?
Dear,
Thanks to Reply my question? Could explain how the code works? Ya sure I try your coding and i get my result. Once again thank you. _ Jawahar S_ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Read/write excel and word 2007 documents from another application | Excel Discussion (Misc queries) | |||
how i can write arabic numbers by microsoft excel word | Excel Discussion (Misc queries) | |||
How to write late-binding code in XL VBA for Word objects? | Excel Programming | |||
Write to Word Document from Excel VBA Help Needed | Excel Programming | |||
Find part of a word in Advanced Filter Code | Excel Programming |