Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default userform syntax

I'm trying to clear all comboboxes in one hit.

For Each ComboBox In UserForm1
.Value = ""
Next

... would be great - if it worked!
Can someone please help me wit h the syntax?
TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default userform syntax

For Each cb in UserForm1.Controls
If TypeOf cb Is MSForms.Combobox Then cb.Value = ""
Next cb

HTH
Cordially
Pascal

"Newbie" a écrit dans le message de
...
I'm trying to clear all comboboxes in one hit.

For Each ComboBox In UserForm1
.Value = ""
Next

.. would be great - if it worked!
Can someone please help me wit h the syntax?
TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default userform syntax

Try:

For Each ComboBox In UserForm1
.Clear
Next



"Newbie" wrote:

I'm trying to clear all comboboxes in one hit.

For Each ComboBox In UserForm1
.Value = ""
Next

.. would be great - if it worked!
Can someone please help me wit h the syntax?
TIA

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
IF, THEN SYNTAX BBABBZZ Excel Worksheet Functions 5 January 12th 10 10:11 PM
vba syntax Derrick Excel Discussion (Misc queries) 11 August 5th 09 08:37 PM
If then syntax RL Excel Worksheet Functions 3 June 22nd 05 05:30 AM
Userform inside another userform Ryan Excel Programming 0 April 23rd 04 08:01 PM
Help with Syntax UserForm TextBox John Wilson Excel Programming 1 July 28th 03 04:15 PM


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