comments

  • Thread starter Thread starter Squibbly
  • Start date Start date
how do i show my comments in
the vba editor so i know what i
am doing to each field

A line which begins with REM is treated as a comment.

Anything to the right of a single-quote ' mark is treated as a comment. That
can be in the first character position to make the entire line a comment, or
it can follow valid VBA statements.

Here's a nonsense function as an example:

Public Function SomeFunc (pstrX as String) as Boolean

REM Purpose: write the purpose of your function
'Input: pstrX = describe the input argument
'Output: describe any arguments that are set for output
'Returns: True for successful operation; False for Error
'Created By: Name of Programmer and Date
'Modified: Name, Date, and reason for modification

SomeFunc = True 'Preset for Success
If Len(pstrX) <= 0 then 'If string is zero-length
SomeFunc = False 'Indicate Error
End If

End Function

If that doesn't answer your question, please post back here to clarify.

Larry Linson
Microsoft Access MVP
 
thank you


Larry Linson said:
A line which begins with REM is treated as a comment.

Anything to the right of a single-quote ' mark is treated as a comment.
That
can be in the first character position to make the entire line a comment,
or
it can follow valid VBA statements.

Here's a nonsense function as an example:

Public Function SomeFunc (pstrX as String) as Boolean

REM Purpose: write the purpose of your function
'Input: pstrX = describe the input argument
'Output: describe any arguments that are set for output
'Returns: True for successful operation; False for Error
'Created By: Name of Programmer and Date
'Modified: Name, Date, and reason for modification

SomeFunc = True 'Preset for Success
If Len(pstrX) <= 0 then 'If string is zero-length
SomeFunc = False 'Indicate Error
End If

End Function

If that doesn't answer your question, please post back here to clarify.

Larry Linson
Microsoft Access MVP
 
Back
Top