VBA - Textbox value in form

P

ProjectUser

Got a text box in a form that needs to display a count value when the form is
opened. The value that needs to show in the textbox is a count value. For
example, the number of tasks with “yes†in a customized field column (Flag1)

I’ve tried several things to no avail. I’m assuming the code should be
written in the Private Sub Userform Initialize() section.

Can someone provide me with some coding ideas ? Also, please let me know if
I’m correct in assuming the code should be placed in Private Sub Userform
Initialize().
Thanks,
 
J

Jan De Messemaeker

Hi,

Yes that is the place

Flagcount=0
For each anytask in activeproject.tasks
if not anytask is nothing then
if anytask.flag5 then
flagcount=flagcount+1
end if
end if
next anytask


HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Drop down list control value in vba 2
VBA Coding Help for Beginner 0
Assign Macro to Command Button 1
Dynamic Naming of Form Button 3
Textbox 1
Display Number of Employees 4
VBA word change keys 0
Error 3075 3

Top