| View previous topic :: View next topic |
| Author |
Message |
adrian Guest
|
Posted: Fri Sep 05, 2003 12:32 am Post subject: Calc Cells with a calculated value |
|
|
I want to put the focus over a cell. Then I wan a form to be displayed with three TextBox and a Button that when is pressed returns a calculated value [f(a,b,c)] to de original cell. The cell is anyone from a cell range. ¡Please Help!  |
|
| Back to top |
|
 |
adrian Guest
|
Posted: Fri Oct 03, 2003 9:24 am Post subject: Please help! |
|
|
I try this but dialog doesn't appear:
REM ***** BASIC *****
Dim oPromediator as Object
Sub Main
End Sub
Sub PromediatorShow
oPromediator = LoadDialog("Standard", "Promediator")
oPromediator.Execute()
End Sub
Function HasValue(theObject as Object) As Boolean
If HasUnoInterfaces(theObject, "com.sun.star.lang.XTypeProvider") Then
HasValue = CreateUnoService("com.sun.star.beans.Introspection").inspect(theObject).hasProperty("Value", 'METHODS
End If
End Function
Function GetCurrentCell as SheetCell
Dim sel
sel = ThisComponent.getCurrentController().getSelection()
If HasValue(sel) Then GetCurrentCell = sel
End Function
Function Promedia as decimal
Dim sel
GetCurrentCell.value= TextBox1.Text
End Function
I'n newbie. Please help! |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
adrian Guest
|
Posted: Tue Oct 14, 2003 4:00 am Post subject: Doesn't works |
|
|
| Thanks for your answer, but doesn't works |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
|