I badly need your help in converting Excel VBA to OpenOffice Basic. I have a deadline and I need to submit it ASAP. Your response will be highly appreciated.
If H8 = 10 then
Copy ‘copy different module
Else
Msgbox “Fill-in all required fields to proceed.”
End If
End Sub
[Solved] IF formula convert to OpenOffice Basic Macro
-
- Posts: 2
- Joined: Fri Apr 19, 2019 9:21 am
[Solved] IF formula convert to OpenOffice Basic Macro
Last edited by Hagar Delest on Fri May 03, 2019 9:44 pm, edited 1 time in total.
Reason: tagged solved
Reason: tagged solved
OpenOffice 4.0.1
Re: If excel formula covert to Openoffice Bsaic Macro
Welcome to the Forums.
Regretfully I have little knowledge of OpenOffice programming (aka macros), however, I can tell you that this is not a topic to get into with a deadline
Andrew Pitonyak has a number of books (usually in PDF format) that you can download and read. I suggest googling the name along with "OpenOffice Macros"
Some of the helpers here are a lot more experienced with this type of thing, and might provide you with a working code before your deadline, but we cannot be held responsible if you miss your deadline due to waiting for a response or the time taken to research the requirements so that you can write it yourself.
Regretfully I have little knowledge of OpenOffice programming (aka macros), however, I can tell you that this is not a topic to get into with a deadline
Andrew Pitonyak has a number of books (usually in PDF format) that you can download and read. I suggest googling the name along with "OpenOffice Macros"
Some of the helpers here are a lot more experienced with this type of thing, and might provide you with a working code before your deadline, but we cannot be held responsible if you miss your deadline due to waiting for a response or the time taken to research the requirements so that you can write it yourself.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
-
- Volunteer
- Posts: 1547
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: If excel formula covert to Openoffice Bsaic Macro
A Star Basic macro would look something like this.
Code: Select all
Sub TestValueInCellH8
Dim oSheet As Variant
Dim oCell As Variant
REM when using the OO API, sheet numbers begin with 0
oSheet = ThisComponent.getSheets().getByIndex(0)
REM getCellByPosition(nColumn, nRow) when using the API, row and column numbers begin with 0
oCell = oSheet .getCellByPosition(7, 7) ' cell H8
If oCell.Value() = 10 then
REM Copy ‘copy different module
Else
Msgbox (“Fill-in all required fields to proceed.”,0) 'displays message in a dialog box with just an OK button
End If
End Sub
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: IF formula convert to OpenOffice Basic Macro
VBA and OO Basic are mostly the same in terms of their constructs... if then else etc.
The differences are just how documents and cells and so on are referred to.
You may find the macro recorder the quickest way to get some working code. Recording each step at a time can help you cobble together something that does what you want - without necessarily needing to understand the recorded results.
The differences are just how documents and cells and so on are referred to.
You may find the macro recorder the quickest way to get some working code. Recording each step at a time can help you cobble together something that does what you want - without necessarily needing to understand the recorded results.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
-
- Posts: 2
- Joined: Fri Apr 19, 2019 9:21 am