Thread: Looping a Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Blue Stars Blue Stars is offline
external usenet poster
 
Posts: 1
Default Looping a Macro

Hello. I have created a very simple macro within Excel. It calculates the
sheet (F9) , then searches for a value ( F4 ) . It works, but I need it to
repeat this action continuously until it doe's NOT find the searched for
value. I am using Excel 2003. Thank you. Here is my code :

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/21/2007 by
'
' Keyboard Shortcut: Ctrl+z
'
ActiveSheet.Calculate
Selection.FindNext(After:=ActiveCell).Activate
End Sub