View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default increment operator?

You could create one...
lngNum = AddOne(lngNum)

Function AddOne(ByVal lngN As Long) As Long
AddOne = lngN + 1
End Function

-or-

Call AddOne(lngNum)

Function AddOne(ByRef lngN As Long)
lngN = lngN + 1
End Function
-----------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Peter Morris"
<nospam.ple@se
wrote in message
Is there a shorthand increment operator ?
eg something like :
Inc(long.variable.name)

which would be easier to read than
long.variable.name = long.variable.name + 1
Also decrement too.