G
Guest
I would appreciate if someone would explain how the line method works?
I understand how to use the line method and get it to do what I want. It’s
just the Line method’s syntax in comparison to the standard syntax of all
other methods is very peculiar!
The VB Help defines the syntax as follows:
expression.Line(flags, x1, y1, x2, y2, color)
flags Required
x1 Required
y1 Required
x2 Required
y2 Required
color Required
the VB Help then goes on to give an example and calls the line method like
this:
rpt.Line(sngTop, sngLeft) - (sngWidth, sngHeight), lngColor, B
a) Where is the Required flag?
b) Unlike what it appears from the VB Help definition, if you don’t put a
closing bracket after ‘y1’ as the example does, you get an error!
c) Normally you don’t need any brackets when passing in parameters to a
method, unless you expect a return value?
d) What is this ‘) - (‘ doing in the middle of the parameter list?
e) rpt.Line(sngTop, sngLeft) - Step(sngWidth, sngHeight) How does the ‘step’
keyword accomplish what it does, i.e. height and width of the line, as
opposed to the x2 and y2 positions? It’s not a function?
f) The ‘B’ at the end of the VB Help example (which isn’t even mentioned in
the VB Help explanation), is this the flag mentioned at the beginning of the
definition?
(Just for the record, B tells the line method you want a rectangle/Box, and
BF tells the line method you want a Filled In rectangle/Box).
g) Normally, when you pass in characters to a method (sub or function), the
characters are either a variable, a constant, or you put quotation marks
around it and pass them in as a string. What is going on with the ‘BF’?
I understand how to use the line method and get it to do what I want. It’s
just the Line method’s syntax in comparison to the standard syntax of all
other methods is very peculiar!
The VB Help defines the syntax as follows:
expression.Line(flags, x1, y1, x2, y2, color)
flags Required
x1 Required
y1 Required
x2 Required
y2 Required
color Required
the VB Help then goes on to give an example and calls the line method like
this:
rpt.Line(sngTop, sngLeft) - (sngWidth, sngHeight), lngColor, B
a) Where is the Required flag?
b) Unlike what it appears from the VB Help definition, if you don’t put a
closing bracket after ‘y1’ as the example does, you get an error!
c) Normally you don’t need any brackets when passing in parameters to a
method, unless you expect a return value?
d) What is this ‘) - (‘ doing in the middle of the parameter list?
e) rpt.Line(sngTop, sngLeft) - Step(sngWidth, sngHeight) How does the ‘step’
keyword accomplish what it does, i.e. height and width of the line, as
opposed to the x2 and y2 positions? It’s not a function?
f) The ‘B’ at the end of the VB Help example (which isn’t even mentioned in
the VB Help explanation), is this the flag mentioned at the beginning of the
definition?
(Just for the record, B tells the line method you want a rectangle/Box, and
BF tells the line method you want a Filled In rectangle/Box).
g) Normally, when you pass in characters to a method (sub or function), the
characters are either a variable, a constant, or you put quotation marks
around it and pass them in as a string. What is going on with the ‘BF’?