Solved VBA Font: 1 & l

Weekleyba

Registered User.
Local time
Today, 05:43
Joined
Oct 10, 2013
Messages
593
I find it confusing that in VBA the 1 appears identical to l.
Do you guys just live with it or do you change the default font somehow?
 
I just use a capital L and live with it, but yeah - it's pretty stupid they have it that way
 
Try changing the default font in the VBE options. You may find the difference clearer in certain fonts
 
VBA's default Font is Courier New. But this font also differs from 1 to l. but it looks the same. It looks obviously different if you set the Font to Arial if you want.
 

Attachments

  • screenshot.JPG
    screenshot.JPG
    23.7 KB · Views: 159
Do you guys just live with it
I never noticed. I guess my naming style avoids confusion. Numbers would never be buried in names although they might be used as a suffix so anything that looks like an l in a string is an l.
 
I'm with Colin - you can change the font used for the VBE screen. I would NEVER use a sans-serif font or a proportional font in that context. Which is why Courier New is my preference. Though one could also use Lucida Console. You can also diddle with font size if you are like me and have some (minor - but annoying) vision issues. Since I use continuation syntax happily, it doesn't cost me that much to change away from 8-point fonts to maybe use 10-point or 12-point.

The point about NOT using sans-serif fonts is that I/1 issue doesn't happen. The point about using only non-proportional fonts is that every character takes up the same amount of space so if you have a single-quote and double-quote together, you can see the spacing better and know that you have a mixed-quote string. With something like Arial, you would see three tick-marks together and have some issues as to whether the leading or trailing tick goes with the one in the middle. The point of changing font size is that at 12-point, you are technically making your characters 50% larger than 8-point. You could go larger still but eventually you just need better glasses.
 

Users who are viewing this thread

Back
Top Bottom