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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB & excell - find next is not workin.

Status
Not open for further replies.

amsh7

Programmer
May 27, 2002
18
0
0
US
hello
i open an excel file and find the first word at the sheet.
when I'm usind the findnext method it is remain in the first word.
and also, how can i present the page in my application (not opennung it in excel document (ole??).

the code below:

Dim xlsapp As Excel.Application
Dim xlsbook As Excel.Workbook
Dim xlssheet As Excel.Worksheet



Private Sub Command1_Click()

Dim xlsrange As range


Set xlsapp = CreateObject("Excel.Application")

Set xlsbook = xlsapp.Workbooks.Open("E:\Excel sheets\sites list.xls")

Set xlssheet = xlsbook.Sheets(1)

Set xlsrange = xlssheet.Cells.Find(Text1, , , xlPart, , xlNext, False)

Do While Not (xlssheet.Cells.FindNext.Next = Text1)
xlssheet.Cells.FindNext
Text2 = Text2 + " " + "1"
Loop
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top