View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Repeat Macro until Empty Cell Reached

option explicit
sub testme()
do
activecell.value = mid(activecell.value,6)
activecell.offset(1,0).select
if isempty(activecell) then
exit do
end if
loop
end sub




clpncsg wrote:

How do I repeat the following macro until it reaches an empty cell?

ActiveCell.Offset(0, 0).Select
Application.SendKeys ("{F2}")
Application.SendKeys ("{Home}")
Application.SendKeys ("{Del 5}")
Application.SendKeys ("{ENTER}")



--

Dave Peterson