LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Add code on the fly to existing userforms

I know I can create a new userform with new controls and new code for the
controls on the fly using VB. I have also added controls to an existing
userform but I am having trouble adding code for the controls. The name of
my userform is frmGSN and Code is a string of code. I am trying the
following code but it doesn't recognize the .CodeModule

With frmGSN.CodeModule
.InsertLines .CountOfLines + 1, Code
End With

Please help. Thanks
 
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
Really need help with existing code. Cam Excel Discussion (Misc queries) 0 August 12th 08 07:14 PM
New to userforms - can you help with this code? Anthony Excel Programming 10 December 11th 07 06:49 PM
Modify existing code to dynamic code Ixtreme Excel Programming 5 August 31st 07 11:42 AM
Help with existing code ploddinggaltn Excel Discussion (Misc queries) 1 November 27th 06 09:46 PM
Userforms keep popping up, need code to stop it rammieib Excel Programming 3 February 24th 06 05:24 PM


All times are GMT +1. The time now is 08:09 PM.

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

About Us

"It's about Microsoft Excel"