Ask Your Question

ERas's profile - activity

2019-02-16 15:23:53 +0200 received badge  Famous Question (source)
2018-05-27 12:33:07 +0200 received badge  Notable Question (source)
2018-03-18 15:01:39 +0200 marked best answer Changing a variable in a macro with a macro

So referencing my past question on selecting a range of cells.

Sub column_SelectVisible()
REM Selects the first <lNumberOfCells> visible cells in column <lColumnIndex> in the current Sheet.
    Const lColumnIndex   As Long = 0
    Const lNumberOfCells As Long = 200

    Dim oDoc    As Object : oDoc    = ThisComponent
    Dim oSheet  As Object : oSheet  = oDoc.CurrentController.ActiveSheet
    Dim oColumn As Object : oColumn = oSheet.Columns.getByIndex( lColumnIndex )
    Dim oRanges As Object : oRanges = oColumn.queryVisibleCells()
    Dim oRange  As Object : oRange  = oRanges.getByIndex(0)

    Dim oCursor As Object : oCursor = oSheet.createCursorByRange( oRange )
    oCursor.collapseToSize ( 1, lNumberOfCells )
    oDoc.CurrentController.select( oCursor )
End Sub

I now just need to be able to change the column select variable lColumnIndex to increment as a way to select a different column with 0 being column A, 1 = B and so on. I'm terrible with programming so I kind of do need to be hand held into this.

2018-03-18 13:17:32 +0200 received badge  Popular Question (source)
2018-03-18 12:12:48 +0200 marked best answer Selecting unspecific cells in a macro

Within a macro, I'd like to select every 200 cells within a column without specifying the specific cell address so that once I hide them, select another 200 cells from the start of what's been shown, rinse and repeat.

So instead of the value being "$A$1207:$A$1406" It could just be the $A column and the starting row that is visible.

2018-03-18 12:12:48 +0200 received badge  Scholar (source)
2018-03-18 09:26:42 +0200 commented question Changing a variable in a macro with a macro

Understandable. It's really just that I can't grasp the language and it would genuinely take a year or so to understand.

2018-03-18 03:32:40 +0200 received badge  Student (source)
2018-03-18 02:35:54 +0200 asked a question Changing a variable in a macro with a macro

Changing a variable in a macro with a macro So referencing my past question on selecting a range of cells. Sub column_S

2018-03-17 15:56:36 +0200 commented answer Selecting unspecific cells in a macro

So I'm garbage at programming this, but what line of code would I be writing to increment the column?

2018-03-17 14:40:29 +0200 commented answer Selecting unspecific cells in a macro

If I were to cut and paste the content into a column, how would I write out that line? And would I just add a 1 to the l

2018-03-17 12:30:38 +0200 received badge  Popular Question (source)
2018-03-17 05:42:37 +0200 received badge  Famous Question (source)
2018-03-17 02:39:13 +0200 asked a question Selecting unspecific cells in a macro

Selecting unspecific cells in a macro Within a macro, I'd like to select every 200 cells within a column without specify

2018-03-01 19:28:18 +0200 received badge  Popular Question (source)
2018-03-01 15:29:25 +0200 edited question Sorting one column full of data into columns of 200 rows

Sorting one column full of data into columns of 200 rows I have a massive column of data in Calc and I need to sort it i

2018-03-01 15:29:25 +0200 received badge  Editor (source)
2018-03-01 15:27:46 +0200 edited question Sorting one column full of data into columns of 200 rows

Sorting one column full of data into columns of 200 rows I have a massive column of data in Calc and I need to sort it i

2018-03-01 14:47:52 +0200 asked a question Sorting one column full of data into columns of 200 rows

Sorting one column full of data into columns of 200 rows I have a massive column of data in Calc and I need to sort it i

2018-01-07 11:10:52 +0200 received badge  Notable Question (source)
2018-01-05 06:31:22 +0200 received badge  Popular Question (source)
2018-01-03 11:12:23 +0200 asked a question Being able to import spreadsheets to a database and arranging the date.

Being able to import spreadsheets to a database and arranging the date. I've got a folder of a bunch of invoices that ne