Move data from one cell to another code problem

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
dillon
Posts: 1
Joined: Mon Mar 20, 2017 8:53 pm

Move data from one cell to another code problem

Post by dillon »

Hi

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 ?

Thanks

Dillon
OpenOffice 4.1.3 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11358
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Move data from one cell to another code problem

Post by Zizi64 »

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; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply