Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Action on Error

Frank:

Thank for your help. I tried this, but I receive an
error 91 on the Set statement. Any ideas what I might be
doing wrong?

Thanks,
Mike.

p.s. There is something wrong with the posting ... I
cannot find the previous posting unless I do a search.

-------------------
Hi Mike
try

Set OFound = Cells.Find(What:=mydate, After:=ActiveCell,
LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate

If Not oFound Is Nothing Then
oFound.activate
else
msgbox "not found"
End If


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Action on Error

Mike,

The Find method returns a Range type object, which you can either
Set to the variable OFound, or use with Activate. You can't do
both. Get rid of the Activate method at the end of that line of
code:

Set OFound = Cells.Find(What:=mydate, After:=ActiveCell,
LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
...
Frank:

Thank for your help. I tried this, but I receive an
error 91 on the Set statement. Any ideas what I might be
doing wrong?

Thanks,
Mike.

p.s. There is something wrong with the posting ... I
cannot find the previous posting unless I do a search.

-------------------
Hi Mike
try

Set OFound = Cells.Find(What:=mydate, After:=ActiveCell,
LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate

If Not oFound Is Nothing Then
oFound.activate
else
msgbox "not found"
End If




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Action on Error

Thanks Chip and Frank! I understand this now.

Mike.

-----Original Message-----
Mike,

The Find method returns a Range type object, which you

can either
Set to the variable OFound, or use with Activate. You

can't do
both. Get rid of the Activate method at the end of that

line of
code:

Set OFound = Cells.Find(What:=mydate, After:=ActiveCell,
LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
...
Frank:

Thank for your help. I tried this, but I receive an
error 91 on the Set statement. Any ideas what I might

be
doing wrong?

Thanks,
Mike.

p.s. There is something wrong with the posting ... I
cannot find the previous posting unless I do a search.

-------------------
Hi Mike
try

Set OFound = Cells.Find(What:=mydate,

After:=ActiveCell,
LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate

If Not oFound Is Nothing Then
oFound.activate
else
msgbox "not found"
End If




.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excell copy action pauses for 15 second for the smallest action Meekal Excel Discussion (Misc queries) 1 January 28th 10 04:30 PM
Allow no action to be taken Smitty[_2_] Excel Worksheet Functions 4 January 23rd 08 10:52 PM
what is OLE.action Flute Excel Discussion (Misc queries) 1 December 2nd 04 09:04 PM
Action on error Mike Excel Programming 2 February 27th 04 06:08 PM
Error msg "Microsoft Excel is waiting for another application to complete an OLE action" JimPNicholls Excel Programming 0 January 16th 04 12:41 PM


All times are GMT +1. The time now is 08:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"