Page 1 of 1

Move data from one cell to another code problem

Posted: Tue Mar 21, 2017 11:56 pm
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

Re: Move data from one cell to another code problem

Posted: Wed Mar 22, 2017 12:05 am
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.