PC Review


Reply
Thread Tools Rate Thread

adding code lines with vba code

 
 
thread
Guest
Posts: n/a
 
      5th Feb 2008
Hi all
does anyone have examples of vba code that adding vba code line?
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      5th Feb 2008
I think you may have to provide us with a more detailed description of what
you are trying to do.

Rick

"thread" <(E-Mail Removed)> wrote in message
news:c1c9d256-e0d2-47b6-8b7a-(E-Mail Removed)...
> Hi all
> does anyone have examples of vba code that adding vba code line?


 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      5th Feb 2008
Dim StartLine As Long

With ActiveWorkbook.VBProject.VBComponents("Module1").CodeModule
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" <(E-Mail Removed)> wrote in message
news:c1c9d256-e0d2-47b6-8b7a-(E-Mail Removed)...
> Hi all
> does anyone have examples of vba code that adding vba code line?



 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      5th Feb 2008
All explained nicely here:
http://www.cpearson.com/excel/vbe.aspx

RBS


"thread" <(E-Mail Removed)> wrote in message
news:c1c9d256-e0d2-47b6-8b7a-(E-Mail Removed)...
> Hi all
> does anyone have examples of vba code that adding vba code line?


 
Reply With Quote
 
thread
Guest
Posts: n/a
 
      6th Feb 2008
On 5 פברואר, 23:50, "RB Smissaert" <bartsmissa....@blueyonder.co.uk>
wrote:
> All explained nicely here:http://www.cpearson.com/excel/vbe.aspx
>
> RBS
>
> "thread" <yaniv...@gmail.com> wrote in message
>
> news:c1c9d256-e0d2-47b6-8b7a-(E-Mail Removed)...
>
>
>
> > Hi all
> > does anyone have examples of vba code that adding vba code line?-הסתר טקסט מצוטט-

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


thank you very much
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding lines of code to a macro to delete rows childofthe1980s Microsoft Excel Programming 11 27th Dec 2009 07:23 AM
Creating excel file, adding code to it from code, VBE window stays BlueWolverine Microsoft Excel Programming 0 5th Nov 2009 07:55 PM
Application Crash Whie adding Code lines using VBA Amit Kumar Microsoft Excel Programming 4 13th Mar 2008 01:49 PM
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Microsoft Excel Programming 3 11th Dec 2006 05:14 AM
Code to write out all lines of code davidm Microsoft Excel Programming 3 5th Aug 2005 04:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:30 AM.