View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Donna[_7_] Donna[_7_] is offline
external usenet poster
 
Posts: 17
Default Using A Macro To Add Event Procedure To A CommandButton

Bob, Thanks for trialing the code for me. To get round the memory
error I changed to code to use .InsertLines (which does inc the
+1)(see next post from myself). The code works well for a trial
workbook I used but when I use it on the workbook where I actually
want the new button I get a Run-time error 9 : Subscript Out of Range
when I try and run the With ActiveWorkBook......line.
As far as I can see the with statement doesn't reference anything
particular to my trial file....should I have a dim statement or
something?

I still need to find a way of getting
d="E1" rather than d=E1 in my commandButton code. Any ideas anybody?