Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-10-2011, 03:54 AM
Cbrehm Cbrehm is offline looping controls on userforms Windows 7 64bit looping controls on userforms Office 2003
Novice
looping controls on userforms
 
Join Date: May 2011
Posts: 8
Cbrehm is on a distinguished road
Default looping controls on userforms

Excel 2002


On a userform I have some Textboxes, listboxes, etc that I want to set .value=empty

Currently I do it by
'clear some values
Code:
TSEFAN.Value = empty
    TSEFPD.Value = empty
    TSEFAP.Value = empty
Now I have tried,

Code:
Sub controlempty(formname As MSForms)
    'pass form name to use

Dim cCont As Control

    For Each cCont In formname

        .Value = Empty

    Next cCont

End Sub
then in the code for saving the data I have the line
Code:
controlempty ADDCORT
ADDCOURT is the name of the form

get error "Expected user-defined type, not project"

Help Thanks

Last edited by Cbrehm; 05-10-2011 at 05:02 AM. Reason: More info
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
looping controls on userforms how to use Building Blocks or controls to add a page verbster Word 11 03-06-2011 04:05 PM
looping controls on userforms Grouping Content Controls cksm4 Word VBA 2 03-01-2011 12:46 PM
looping controls on userforms Format picture controls are acting weird. WaltR Drawing and Graphics 1 02-11-2011 02:47 PM
looping controls on userforms hide ghosted controls designer PowerPoint 1 01-03-2011 07:11 AM
Can't Download Controls BillTheAdmin Project 2 12-05-2005 10:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft