D
Donna
I hope this won't be a duplicate of a post i have not long posted but
it seems to have disappeared!
I am trying to combine responses I had a few weeks ago with Chip
Pearsons 'Creating An Event Procedure'..I am slowly getting somewhere.
I am using the following:-
CellCel="E1"
With ActiveWorkbook.VBProject.VBComponents(ActiveSheet.Name).CodeModule
X = CountOfLines
.InsertLines X + 1, "Sub CommandButton1_Click"
.InsertLines X + 2, "d=" & CellSel
.InsertLines X + 3, "End Sub"
End With
Which gives me:-
Sub CommandButton1_Click()
d = E1
End Sub
How do I get d="E1"?
As a side question: Why if I change the InsertLine to "Private Sub
CommandButton1_click" do I get a "can't read memory error" when I step
through the program and try to run the InsertLine X+2 line? I also
get the read memory error when I try and use Chip Pearsons
CreateEventProc procedure at the insertlines point....Any ideas why? i
can post the code i am using for the createEventProc if it will be
useful.
Thank you for any responces.
it seems to have disappeared!
I am trying to combine responses I had a few weeks ago with Chip
Pearsons 'Creating An Event Procedure'..I am slowly getting somewhere.
I am using the following:-
CellCel="E1"
With ActiveWorkbook.VBProject.VBComponents(ActiveSheet.Name).CodeModule
X = CountOfLines
.InsertLines X + 1, "Sub CommandButton1_Click"
.InsertLines X + 2, "d=" & CellSel
.InsertLines X + 3, "End Sub"
End With
Which gives me:-
Sub CommandButton1_Click()
d = E1
End Sub
How do I get d="E1"?
As a side question: Why if I change the InsertLine to "Private Sub
CommandButton1_click" do I get a "can't read memory error" when I step
through the program and try to run the InsertLine X+2 line? I also
get the read memory error when I try and use Chip Pearsons
CreateEventProc procedure at the insertlines point....Any ideas why? i
can post the code i am using for the createEventProc if it will be
useful.
Thank you for any responces.