Hi all
Here is my code:
I can't get the find function to work. It gives me the error:
Run-time error '438' Object doesn't support this property or method.
Now I think it has something to do with the Activesell bit. I put sheet before it as it is the variable I have set the object reference to for the worksheet in excel. Without sheet. it gives the following error:
Run-time error '424' Object Required
I cannot figure out how to make this work. Can anyone help??
All help and advise is greatly appreciated.
Many Thanks
Tim
Here is my code:
Code:
Dim workbooks As Document
Dim xlApp As Object
Dim workbook As Object
Set xlApp = CreateObject("excel.application")
xlApp.Visible = False
Set workbook = xlApp.workbooks.Open("C:\AWARD_PROFILES.xls")
xlApp.Visible = True
Set sheet = workbook.Worksheets("Profile_Source")
sheet.Activate
sheet.cells.Find(What:="VU", After:=sheet.Activecell, LookIn:=xlFormulas, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True) _
.Activate
I can't get the find function to work. It gives me the error:
Run-time error '438' Object doesn't support this property or method.
Now I think it has something to do with the Activesell bit. I put sheet before it as it is the variable I have set the object reference to for the worksheet in excel. Without sheet. it gives the following error:
Run-time error '424' Object Required
I cannot figure out how to make this work. Can anyone help??
All help and advise is greatly appreciated.
Many Thanks
Tim