ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   adding code lines with vba code (https://www.excelbanter.com/excel-programming/405637-adding-code-lines-vba-code.html)

thread

adding code lines with vba code
 
Hi all
does anyone have examples of vba code that adding vba code line?

Rick Rothstein \(MVP - VB\)[_1231_]

adding code lines with vba code
 
I think you may have to provide us with a more detailed description of what
you are trying to do.

Rick

"thread" wrote in message
...
Hi all
does anyone have examples of vba code that adding vba code line?



Bob Phillips

adding code lines with vba code
 
Dim StartLine As Long

With ActiveWorkbook.VBProject.VBComponents("Module1").C odeModule
StartLine = .CountOfLines + 1
.InsertLines StartLine, _
"Sub TestProc()" & vbCrLf & _
"Dim ans" & vbCrLf & _
" ans = Msgbox( ""All OK"",vbYesNo)" & vbCrLf & _
" If ans = vbNo Then Cancel = True" & vbCrLf & _
"End Sub"
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"thread" wrote in message
...
Hi all
does anyone have examples of vba code that adding vba code line?




RB Smissaert

adding code lines with vba code
 
All explained nicely he
http://www.cpearson.com/excel/vbe.aspx

RBS


"thread" wrote in message
...
Hi all
does anyone have examples of vba code that adding vba code line?



thread

adding code lines with vba code
 
On 5 פברואר, 23:50, "RB Smissaert"
wrote:
All explained nicely hehttp://www.cpearson.com/excel/vbe.aspx

RBS

"thread" wrote in message

...



Hi all
does anyone have examples of vba code that adding vba code line?-הסתר טקסט מצוטט-


-הראה טקסט מצוטט-


thank you very much


All times are GMT +1. The time now is 09:42 AM.

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