Watch the Parens

Watch the Parens

If you want to pass a parameter to a subroutine, use this code:

 	Call doFormat(txtPerson)

You can also call the subroutine without the Call statement. However, if you don’t include the Call statement, you can’t include parentheses:

 	doFormat (txtPerson)

In VB, expressions in parentheses are evaluated before they’re processed. So by putting parentheses around the control name, you’re telling it to evaluate it. Because a control can’t be evaluated, it gives you the value of the default property. This code actually passes the Text string value-because Text is the default property-to the subroutine instead of passing the control. Because the routine expects a textbox and not a string, it generates the type mismatch.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several