Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Removing Controls at RunTime?

Hi,

I'm trying to remove controls from my form at runtime. The controls have
already been added using something similar to the code below.

For TeamLoop = 1 To 3

Set TeamChkBox = Controls.Add("Forms.CheckBox.1", "chkTeam" & TeamLoop,
Visible)

Next TeamLoop

Does anyone know the syntax for removing these controls from my form?

Ta.

Neil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Removing Controls at RunTime?

Neil,

Try this

Me.Controls.Remove "CheckBox1"

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Neily" wrote in message
...
Hi,

I'm trying to remove controls from my form at runtime. The controls have
already been added using something similar to the code below.

For TeamLoop = 1 To 3

Set TeamChkBox = Controls.Add("Forms.CheckBox.1", "chkTeam" &

TeamLoop,
Visible)

Next TeamLoop

Does anyone know the syntax for removing these controls from my form?

Ta.

Neil



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
Assigning events to runtime-created controls - is it possible? BizMark Excel Discussion (Misc queries) 1 November 20th 06 09:36 AM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
How to create controls at runtime Andy Chan Excel Programming 3 August 30th 04 10:07 AM
Add Controls With Events at Runtime llowwelll Excel Programming 10 May 24th 04 11:52 AM
creating controls at runtime defj Excel Programming 2 December 2nd 03 07:14 AM


All times are GMT +1. The time now is 03:50 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"