ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Interpretation (https://www.excelbanter.com/excel-discussion-misc-queries/150131-interpretation.html)

M&M[_2_]

Interpretation
 
I have the code below, what is the function of the line:

" ColOut = ColOut + 1 " ??????????????


HeaderRow = Range("Header").Row
Sheets("Output").Cells.ClearContents
RowIn = HeaderRow + 1 ' first row
RowOut = 1

Do
ColOut = 1
Sheets("Output").Cells(RowOut, ColOut) = "$INPUT"
ColOut = ColOut + 1
ColIn = 2

Pete_UK

Interpretation
 
It increments the value of the variable ColOut.

Hope this helps.

Pete

On Jul 13, 5:42 pm, M&M wrote:
I have the code below, what is the function of the line:

" ColOut = ColOut + 1 " ??????????????

HeaderRow = Range("Header").Row
Sheets("Output").Cells.ClearContents
RowIn = HeaderRow + 1 ' first row
RowOut = 1

Do
ColOut = 1
Sheets("Output").Cells(RowOut, ColOut) = "$INPUT"
ColOut = ColOut + 1
ColIn = 2




Stan Brown

Interpretation
 
Fri, 13 Jul 2007 09:42:01 -0700 from M&M
:
I have the code below, what is the function of the line:

" ColOut = ColOut + 1 " ??????????????


It's a standard programming way of adding 1 to the ColOut variable.

I realize it looks odd, but in programming the = sign has two
meanings, "is equal to" and "is replaced by" This is an example of
the latter use, just like in
ColOut = 1

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/


All times are GMT +1. The time now is 07:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com