Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel- Find Replace problem...

Status
Not open for further replies.

RMasters

Programmer
Nov 14, 2000
36
0
0
GB
I am having trouble with programming excel from vb .net.
I need to run a find replace on a spreadsheet that I create in code- creating the .xls is no problem but I am unable to run the find\replace. Can anyone help me.

Many thanks

Rick Masters
 
I would use something like:

Code:
myExelApp.mySheet.myRange.Find( _
        what:= ?xxx? , _
        after:= ?xxx? , _
        LookIn:= xlValues, _
        lookat:= xlWhole, _
        searchorder:= xlByColumns, _
        searchdirection:= xlNext)

Obviously adjust to suit your needs. If it still doesn't work - what error are you getting?

T0AD

There's a thin line between genius, and insanity!
 
Cheers TOAD, I wasn't defining a range- whoops.

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top