Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
ronnie davidson
 
Posts: n/a
Default how to stop/ restart macro after selecting from autofilter list

How do I stop and restart macro after selecting item from an autofilter list
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default how to stop/ restart macro after selecting from autofilter list

As always post your coding efforts for comments

--
Don Guillett
SalesAid Software

"ronnie davidson" <ronnie
wrote in
message ...
How do I stop and restart macro after selecting item from an autofilter
list



  #3   Report Post  
Posted to microsoft.public.excel.misc
broro183
 
Posts: n/a
Default how to stop/ restart macro after selecting from autofilter list


Hi Ronnie,

I agree with Don, it is much easier to offer suggestions when we can
consider what you already have. However, in saying that, from what you
have stated, I'd suggest incorporating the filtering action into the
existing macro & entering the value using an input box eg:

Dim StringToFind As String
StringToFind = InputBox("Please enter your string to find", "String to
Find")

'To end sub if "cancel" was pressed sourced from _
http://www.excelforum.com/showthread...vbcancel+input
& http://vb.mvps.org/tips/varptr.asp
If StrPtr(StringToFind) = 0 Then
MsgBox "no string to find entered"
GoTo ExitSub
Else
End If

Range("a1", ActiveCell.SpecialCells(xlLastCell)).AutoFilter Field:=1,
_
Criteria1:="=*" & StringToFind & "*"

Have a play with this & see if it works for you. To set the column for
filtering, change "Field:=1," to another #. NB, 1 is not necessarily
col A, it is the first column with a filter on it.
If you would like a complete macro (which can be linked to a short cut
key)that will do things like filter for contents of active cell/
blanks/ your input etc, let me know & I can post my toy!
Or for something more bulletproof but potentially slower try searching
for Ron DeBruin's EasyFilter addin.

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=530479

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
running a macro from a list rufusf Excel Worksheet Functions 0 February 22nd 06 04:38 PM
Loop Macro autofilter Paul. Excel Discussion (Misc queries) 2 March 25th 05 09:35 AM
Shadows of the Pivottable Field List while macro is running David P Excel Worksheet Functions 0 February 25th 05 07:11 PM
How to create a macro that compares a list to another list Rampa New Users to Excel 1 January 13th 05 01:15 PM
Selecting data from a list based on entered values GrantM Excel Discussion (Misc queries) 1 December 20th 04 10:59 AM


All times are GMT +1. The time now is 10:34 AM.

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

About Us

"It's about Microsoft Excel"