Some Command Argument Names Not Capitalized

ID: Q113152


The information in this article applies to:
  • Microsoft Visual Basic programming system, Applications Edition, version 1.0


SYMPTOMS

In Microsoft Visual Basic Programming System, Applications Edition, when you edit or run a procedure, command argument names in the procedure may not be capitalized.


CAUSE

When you edit or run a procedure in a Visual Basic, Applications Edition module, all built-in commands and some argument names are automatically capitalized to make it easier to read your code. Built-in command argument names and identifier names appear with the capitalization you used when you typed them, unless they happen to be the same as a command name (in which case, they are capitalized the same way as the command) or you typed them with different capitalization previously in the same procedure (in which case, the previous capitalization is used).

For example, if you enter the following line of code in a Visual Basic module


   filesaveas format:=2, name:="Test", backup:=true 
when you press ENTER with the insertion point at the end of this line, or run the procedure that contains the command, the command appears as follows:

   FileSaveAs format:=2, Name:="Test", backup:=True 
FileSaveAs is capitalized because it is a built-in command. Because "format" and "backup" are not built-commands, they are not capitalized. Name is a built-in command, although it is an argument name in this example, so it is capitalized. True is a built-in value so it is capitalized.

If you then change the above line of code to the following

   FileSaveAs format:=2, Name:="Test", BaCKup:=true 
when you press ENTER with the insertion point at the end of this line or run the procedure that contains the command, the command appears as you typed it. Because "backup" is not a built-in command, it retains the capitalization you give it.

If you then enter a new line of code in the same procedure using the same parameters as follows

   filesaveas format:=2, name:="Test2", backup:=true 
when you press ENTER with the insertion point at the end of this line or run the procedure that contains the command, the command appears as follows:

   FileSaveAs format:=2, Name:="Test2", BaCKup:=True 
Because you have previously used the "backup" argument in the procedure, it is capitalized the same as the first instance you typed in the procedure (BaCKup) even though "backup" is not a built-in command.

Additional query words:

Keywords :
Version : :1.0
Platform : WINDOWS
Issue type :


Last Reviewed: October 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.