Too slow

J

Joel

In my Task form, I run this sub:

Sub Item_CustomPropertyChange(ByVal strName)
Set prps = Item.UserProperties
If prps("HeatBarrier") = "True" Then
.......

I have many if prps statements. It's really slow. Takes about 10 seconds
to go from field to field within my form.

Can you suggest an alternative to make it go faster.

Thanks - Joel
 
D

Duncan McCreadie

I am not usre quite what you are trying toa chieve as the CustomProperty str
Name is not being used in your IF statement. I would use a SELECT CASE
clause if the userproperties are being changed in line with the
CustomPropertyChange event e.g.

Select Case strName
Case "HeatBarrier"
....

HTH

Duncan
 
J

Joel

Thanks.

Would this work?:

Dim HeatBarrierString

Select HeatBarrierString
Case "HeatBarrier"

If HeatBarrierString = "True" Then
...........................
end if

If HeatBarrierString = "False" Then
...........................
end if

Thanks for your help with the syntax
-Joel
 

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


Top