View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ernest Lai Ernest Lai is offline
external usenet poster
 
Posts: 9
Default If statement to stop Macro

Hi all, I have a macro which basically rearranges data ready for another
person to upload. I want to create a fail safe for it. Can I make a macro
to do, If the cursor is not in A1 field on both sheets not to run, and print
an error msg? I imagine it will be something like:

If cursor A1 on Sheet A And A1 on Sheet B
Then run macro <name
Else "print error, cursor not in A1 positions on sheet A / B" And End macro.

Thanks in advance, and any help is much appretiated

Ernest