Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default adding code lines with vba code

Hi all
does anyone have examples of vba code that adding vba code line?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
can someone help me with these 8 lines of code mithu Excel Programming 3 April 20th 07 03:10 PM
can someone help me with these 8 lines of code mithu Excel Programming 2 April 19th 07 09:59 PM
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM
How to see how many lines of code ? SpookiePower Excel Programming 3 January 25th 06 03:01 AM
Code to write out all lines of code davidm Excel Programming 3 August 5th 05 04:26 AM


All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"