Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default insert lines into CODEMODULE gives error


people, i 'am creating dynamically 3 worksheets, and on each worksheet
have from 0 to X number of dynamically created controls llike combobox

when i'm finishing create one of 3 sheets, i try to create events t
all comboboxes which i'm create


-----------------------------------
Dim evnt As Long
Dim cm As CodeModule

cnames = Array("s201", "s202")

For Each v1 In cnames
With Worksheets(v1)
.Activate

Set cm
ActiveWorkbook.VBProject.VBComponents(.CodeName).C odeModule

v2 = "worker1"
evnt = cm.CreateEventProc("change", v2)

v2 = "worker2"
evnt = cm.CreateEventProc("change", v2)

Set cm = Nothing

End With
Next
---------------------------------------

here is a very simple of code,
problem is when my code try to create this code in the next sheet (i
array next value ), then excel hang up

where is the problem ????


thank you :

--
Mare
-----------------------------------------------------------------------
Marek's Profile: http://www.excelforum.com/member.php...fo&userid=1376
View this thread: http://www.excelforum.com/showthread.php?threadid=26289

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
Insert Lines RENEE Excel Worksheet Functions 7 May 7th 10 07:59 PM
Insert extra lines RENEE Excel Discussion (Misc queries) 3 April 29th 10 10:52 PM
how can i insert a row every five lines in excel Yogibear Excel Discussion (Misc queries) 1 August 3rd 06 08:06 PM
insert lines abunge Excel Discussion (Misc queries) 3 June 5th 06 09:02 AM
how to automatically insert blank lines in between non-blank lines No Name Excel Programming 2 November 17th 03 03:40 PM


All times are GMT +1. The time now is 01:31 AM.

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"