Specialeffect property

C

Chris

Can the special effect property be used in vb code? I'm trying to change
the textbox from flat to sunken when a command button is clicked.

I'm trying the code me.txtName.Specialeffect = "sunken"

but I'm getting the error msg;

runtime error '13'
type mismatch
 
D

Douglas J Steele

While you may select from words like "Flat", "Raised" and "Sunken" when
setting that property through the GUI, the property is actually numeric.

For Flat, you need to use 0. Raised is 1, Sunken 2, Etched is 3, Shadowed is
4 and Chiseled is 5. To save you having to memorize those number, you can
use the intrinsic constants acEffectNormal, acEffectRaised, acEffectSunken,
acEffectEtched, acEffectShadow and acEffectChisel respectively.
 
C

Chris

Thanks Douglas, When ever I see that you have replied to my questions, I
smile - as I know you will be able to provide me an answer that even I can
understand. Thanks again.
 
Top