ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using A Macro To Add Event Procedure To A CommandButton (https://www.excelbanter.com/excel-programming/323677-using-macro-add-event-procedure-commandbutton.html)

Donna[_7_]

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?


All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com