Welcome beginner. Please answer all of the questions below which may provide information necessary to answer your question.
-----------------------------------------------------------------------------------------------------------
Which version of OpenOffice.org are you using? 2.4.1
What Operating System (version) are you using? XP Pro
What is your question or comment?
I am new to OO and I am having an issue with Textboxes on a spreadsheet. Basically, I want to build a form on a spreadsheet using Labels, Textboxes and Buttons with code being written in Basic. I have done a lot of work in Excel, but the property information in Calc is limited. How can I place a Textbox on a spreadsheet and use a Button to return information from Basic to the Textbox? I am not very smart, so please keep simple. Thanks...
[Solved] Post data to a Calc Textbox using Basic?
[Solved] Post data to a Calc Textbox using Basic?
Last edited by Hagar Delest on Mon Jul 07, 2008 11:20 pm, edited 1 time in total.
Reason: tagged the thread as Solved.
Reason: tagged the thread as Solved.
Re: How can data be posted to a Textbox using Basic?
Assuming a text box named TB1 on Sheet1.
Code: Select all
Sub Main
oSheet = ThisComponent.Sheets.getByIndex(0)
oDP = oSheet.getDrawPage.Forms.getByName("Standard")
oTB = oDP.getByName("TB1")
oTB.String = "New text"
End Sub
Re: How can data be posted to a Textbox using Basic?
Issue solved; see JohnV's post below. Thanks JohnV, this clears up the issue of accessing object properties.