ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Find" expression won't work (https://www.excelbanter.com/excel-programming/368472-find-expression-wont-work.html)

Harold Good

"Find" expression won't work
 
Hi, I know little about VBA, so I've recorded a macro and pasted (see below)
it into the VBA window. It works great as a macro, but won't work when I run
it in VBA. I end up with Run-time error '1004'.

This VBA code will work fine on a different worksheet, but not on this
"Progress" sheet. I've tried everything I can think of but can't get it to
run. The term "bottomofaddnewrows" does exist, and can be found by the
macro.

Any help would be appreciated.

Harold

============================
Sheets("Progress").Select
Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate



Don Guillett

"Find" expression won't work
 
both worked
Sub findbottom()
'Sheets("sheet5").Select
'Cells.Find("bot").Activate
'or BETTER
Application.Goto Sheets("sheet5").Cells.Find("bot")
End Sub

--
Don Guillett
SalesAid Software

"Harold Good" wrote in message
...
Hi, I know little about VBA, so I've recorded a macro and pasted (see
below) it into the VBA window. It works great as a macro, but won't work
when I run it in VBA. I end up with Run-time error '1004'.

This VBA code will work fine on a different worksheet, but not on this
"Progress" sheet. I've tried everything I can think of but can't get it to
run. The term "bottomofaddnewrows" does exist, and can be found by the
macro.

Any help would be appreciated.

Harold

============================
Sheets("Progress").Select
Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
_
xlNext, MatchCase:=False, SearchFormat:=False).Activate




Harold Good

"Find" expression won't work
 
So simple but yet it works great! Thanks for your help, Don!

Harold

=====================
"Don Guillett" wrote in message
...
both worked
Sub findbottom()
'Sheets("sheet5").Select
'Cells.Find("bot").Activate
'or BETTER
Application.Goto Sheets("sheet5").Cells.Find("bot")
End Sub

--
Don Guillett
SalesAid Software

"Harold Good" wrote in message
...
Hi, I know little about VBA, so I've recorded a macro and pasted (see
below) it into the VBA window. It works great as a macro, but won't work
when I run it in VBA. I end up with Run-time error '1004'.

This VBA code will work fine on a different worksheet, but not on this
"Progress" sheet. I've tried everything I can think of but can't get it
to run. The term "bottomofaddnewrows" does exist, and can be found by
the macro.

Any help would be appreciated.

Harold

============================
Sheets("Progress").Select
Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
_
xlNext, MatchCase:=False, SearchFormat:=False).Activate






Don Guillett

"Find" expression won't work
 
happy to help

--
Don Guillett
SalesAid Software

"Harold Good" wrote in message
...
So simple but yet it works great! Thanks for your help, Don!

Harold

=====================
"Don Guillett" wrote in message
...
both worked
Sub findbottom()
'Sheets("sheet5").Select
'Cells.Find("bot").Activate
'or BETTER
Application.Goto Sheets("sheet5").Cells.Find("bot")
End Sub

--
Don Guillett
SalesAid Software

"Harold Good" wrote in message
...
Hi, I know little about VBA, so I've recorded a macro and pasted (see
below) it into the VBA window. It works great as a macro, but won't work
when I run it in VBA. I end up with Run-time error '1004'.

This VBA code will work fine on a different worksheet, but not on this
"Progress" sheet. I've tried everything I can think of but can't get it
to run. The term "bottomofaddnewrows" does exist, and can be found by
the macro.

Any help would be appreciated.

Harold

============================
Sheets("Progress").Select
Cells.Find(What:="bottomofaddnewrows", After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate









All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com