Move data from one cell to another code problem

Creating a macro - Writing a Script - Using the API

Move data from one cell to another code problem

Postby dillon » Tue Mar 21, 2017 11:56 pm


This code works on Win XP and Excel 2003.

Range ("B" & Cells(Rows.Count).Row).End(x1Up).Offset(0, 5).Value = Range("B9").Value

When I run it on Win 10 and OpenOffice 4.1.3 it gives error message
on the first line of code.

Basic runtime error. Object variable not set.

Any suggestions ?


OpenOffice 4.1.3 on Windows 10
Posts: 1
Joined: Mon Mar 20, 2017 8:53 pm

Re: Move data from one cell to another code problem

Postby Zizi64 » Wed Mar 22, 2017 12:05 am

Range ("B" & Cells(Rows.Count).Row).End(x1Up).Offset(0, 5).Value = Range("B9").Value

It is an MS VBA code.
The MS VBA and the API of the AOO are not compatible. (API = Application Programming Interface.)
You need rewrite the macro code based on the API functions.

Use the native fileformats (ODF: .ods) and the API functions for the macro code.
Tibor Kovacs, Hungary; LibreOffice4.4.7 on Win7x64Prof.
And the portable versions: LO3.3.0-LO5.4.1 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Posts: 5787
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 5 guests