Search code examples
excelapivbasyntaxcell

Syntax for a cell in vba


I ma just starting up with VBA and I have come into quite a bit of trouble with the Syntax. Is the format for a cell in vba, (column, row) or (row,column)?

Is there a conclusive API for VBA similar to the API on the Oracle site for Java?


Solution

  • Assuming Excel.

    There is VBA the language which is one thing, and then there is how the application hosting VBA (Excel, Word etc) exposes itself to VBA (via its Object Model) which is what your specific question relates to.

    The argument order is:

     .Cells(row, column)
    

    (http://msdn.microsoft.com/en-us/library/ff196273(v=office.14).aspx)

    See References for VBA and Excel Object Model documentation by version.