Ask Your Question

baseplodder's profile - activity

2019-02-04 23:26:24 +0100 received badge  Famous Question (source)
2019-02-04 23:26:24 +0100 received badge  Notable Question (source)
2019-02-04 23:26:24 +0100 received badge  Popular Question (source)
2019-02-03 15:20:23 +0100 received badge  Popular Question (source)
2019-02-03 11:41:42 +0100 commented question Calc macro to display same section when switching sheets

Hi Ratsinger and Lupp. I have ticked Ratsinger's suggestion because it identifies my problem correctly with a 3D conce

2019-02-03 11:39:20 +0100 answered a question Calc macro to display same section when switching sheets

Hi Ratsinger and Lupp. I have ticked Ratsinger's suggestion because it identifies my problem correctly with a 3D conce

2019-02-03 11:14:49 +0100 marked best answer Calc macro to display same section when switching sheets

I would be grateful if someone could help me with a problem I have in Calc. After having scrolled down and across sheet #1 of my worksheet so that, for example, the cell AA50 is in the upper left-hand corner I want to click on the tab 'sheet #2' and make the corresponding cell (AA50) of sheet #2 be displayed at the upper left hand corner. In other words I want to be able to see the same section of a sheet when I change sheets - to make it appear as if they were synced to each other.

There does not seem to be any simple way of doing this, so I suppose I must write a macro that looks for the upper left hand corner of sheet #1 and then displays the same cell of sheet #2 in that position. This macro must then be attached to the sheet #2 tab. Having never written a macro for LO Calc I have no idea how to start. I would therefore be very thankful for any help from the community.

2019-02-02 19:00:55 +0100 asked a question Calc macro to display same section when switching sheets

Calc macro to display same section when switching sheets I would be grateful if someone could help me with a problem I h

2018-03-19 22:15:50 +0100 received badge  Famous Question (source)
2018-03-19 22:03:17 +0100 received badge  Famous Question (source)
2018-03-19 22:03:17 +0100 received badge  Notable Question (source)
2017-11-05 15:38:58 +0100 received badge  Famous Question (source)
2017-09-19 15:51:51 +0100 received badge  Notable Question (source)
2017-08-29 16:39:00 +0100 commented answer Change the table referred to in the base form content with a macro

Thank you Librebel - magnificent and without insider knowledge impossible to guess. Thank you also for the generality of

2017-08-29 16:38:43 +0100 marked best answer Change the table referred to in the base form content with a macro

Hi! I hope someone can help me. I want to change the content of a form with a macro. I have a form "Display". Its 'Form Properties-Data-Content' box defines the content of the form to be a table "Table 1". I am attempting to write a macro that will change this content from "Table1" to "Table2". I found on this site a solution to a similar enquiry 'Change the base form sort property by macro' and have experimented along the lines suggest there. But many attempts based around the lines shown below have failed.

oForm = ThisComponent.Drawpage.Forms.getByName("Display")

oForm.Content = "(""Table2"")"

oForm.reload()

The objection is "Property or method not found:Content".

I have looked into the literature but can find no example where someone is changing the content of a form and am puzzled because if 'Filter' worked in the previous enquiry what should I use other than 'Content' here? Can anyone give me a clue how to proceed?

2017-08-29 12:49:12 +0100 edited question Change the table referred to in the base form content with a macro

Change the table referred to in the base form content with a macro Hi! I hope someone can help me. I want to change the

2017-08-29 12:47:03 +0100 asked a question Change the table referred to in the base form content with a macro

Change the table referred to in the base form content with a macro Hi! I hope someone can help me. I want to change the

2017-08-19 18:07:04 +0100 received badge  Notable Question (source)
2017-08-10 21:09:27 +0100 received badge  Popular Question (source)
2017-08-10 19:36:45 +0100 commented answer macro code for Base push button standard actions

Many thanks! I had come across the OoME PDF before but found it too comprehensive and not ideal for me at this stage. Ho

2017-08-10 19:36:41 +0100 marked best answer macro code for Base push button standard actions

With Base in edit mode, clicking on a push button and then on "control" allows an "action" to be defined for that button. The drop-down button give a list of standard actions like "Save Record" "New Record" "ResetForm" "Delete Form" etc..

I am trying to write the macros that lie behind some of these "standard" actions because I want the push buttons on my form not only to perform one of these actions but then to do some more stuff (like enabling other buttons and altering the appearance of the form). Can anyone give me some guidance as how the code would look for the four actions mentioned above and perhaps also explain the difference between "Rest Form" and "Refresh Form"?

2017-08-10 11:17:34 +0100 asked a question macro code for Base push button standard actions

macro code for Base push button standard actions With Base in edit mode, clicking on a push button and then on "control"

2017-08-08 15:46:06 +0100 commented answer Base macro to switch enable/dis-enabled property of push button

I notice that you bound the subroutine FormClose to the 'View is going to be closed' event rather than to the 'Document

2017-08-07 16:13:21 +0100 received badge  Popular Question (source)
2017-08-03 12:14:43 +0100 commented answer Entering an integer value into a field in a Base form with a macro

Many thanks not only for the quick reply but also for the alternative solutions. Not only has it solved my problem but y

2017-08-03 12:00:31 +0100 marked best answer Entering an integer value into a field in a Base form with a macro

Please could someone tell me how to improve this simple macro: It is meant to add an integer value into a particular field in a form so that when the form is saved this value is part of the new record. If the form is called 'Form' and the name of the field where the value should be added is "Field" and the integer variable whose value is to be stored is called 'x' then trying

Dim oForm As Object
Dim oField As Object
Dim x As Integer
oForm = ThisComponent.Drawpage.Forms.getByName("Form")
oForm.moveToInsertRow
oField = oForm.getByName("Field")
oField.Text = x

displays the value x in the field but it fails to appear on the new record when the form is saved. Anything that I enter into other fields is however saved. (If I overwrite the value in 'Field' after it has been displayed by the macro it will also be stored in the new record!). Hope someone will save me from further bashing my head against the wall.

2017-08-03 11:50:32 +0100 received badge  Enthusiast
2017-08-02 22:10:47 +0100 commented answer Entering an integer value into a field in a Base form with a macro

thanks for the quick reply. I am several hours east of you and my daily brain-power has now rapidly diminished! I need a

2017-08-02 21:22:53 +0100 asked a question Entering an integer value into a field in a Base form with a macro

Entering an integer value into a field in a Base form with a macro Please could someone tell me how to improve this simp

2017-07-30 13:24:39 +0100 commented answer Base macro to switch enable/dis-enabled property of push button

I very much appreciate your help Ratslinger and thank you for the ButtonChangeForms.odb. I spent some time examining and

2017-07-30 13:17:15 +0100 marked best answer Base macro to switch enable/dis-enabled property of push button

I am a beginner in macro-programing in BASE and have a seemingly trivial problem which I cannot solve and cannot find discussed elsewhere in this forum. I would therefore appreciate any help the forum can give me.

I wish to write a macro which opens a form and changes the status of a field in that form. In particular I have a form (Form A) which contains two press buttons (A1 and A2). Associated with each button is a macro (M1 and M2 respectively), both of which open a second form (Form B) which contains a press button (B1). Up to this point I have written code that works. But what I cannot do is the following: the code of M1 and M2 must differ because M1 should enable the button B1, whilst M2 should change the background color of B1 (from say. Gray2 to Cyan or a different RGB Hex code) and should dis-enable B1 so that it cannot be pressed. Can someone tell me what this code difference should be?

As Form B can only be reached from the two buttons on Form A I presently do not have to convert the enabled/dis-enabled status of B1 back to a default value when Form B is exited, but it would be nice to know how this might be achieved if required in the future!

2017-07-30 13:17:14 +0100 received badge  Scholar (source)
2017-07-30 05:15:43 +0100 received badge  Popular Question (source)
2017-07-29 15:45:11 +0100 asked a question Base macro to switch enable/dis-enabled property of push button

Base macro to switch enable/dis-enabled property of push button I am a beginner in macro-programing in BASE and have a s