Bug 161312 - textalign 423 property or method not found
Summary: textalign 423 property or method not found
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
24.2.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://learn.microsoft.com/en-us/off...
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-VBA-Error423
  Show dependency treegraph
 
Reported: 2024-05-29 03:47 UTC by johnks
Modified: 2024-08-23 08:40 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of error (56.93 KB, image/png)
2024-05-29 03:49 UTC, johnks
Details
file containing multiple macro bugs (2.66 MB, application/zip)
2024-05-29 15:38 UTC, johnks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johnks 2024-05-29 03:47:34 UTC
Description:
 .LMessagebox.TextAlign = fmTextAlignLeft

this property seems to be missing in libeoffice calc

Steps to Reproduce:
1. file containing this vba code does not run
2.
3.

Actual Results:
423 error

Expected Results:
it should run as it works in excel


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded
Comment 1 johnks 2024-05-29 03:49:00 UTC
Created attachment 194410 [details]
screenshot of error
Comment 2 Julien Nabet 2024-05-29 11:55:13 UTC
Could you provide the example file?

Indeed, I pasted this on a brand new LO file:
Option VBASupport 1

Public Sub fmsgboxoK(iintmsg As Variant)
With MessageBox
.Height = 130
.LMessagebox.Height = 60
.CommandButton1.Top = 78
.LMessagebox = "*" + iintmsg
'.LMessagebox.TextAlign = fmTextAlignLeft
.Show
End With
End Sub

and got this message when trying it:
"Basic runtime error.
'91' Object variable not set."
Comment 3 johnks 2024-05-29 15:38:11 UTC
Created attachment 194427 [details]
file containing multiple macro bugs

remove the following in order
(search for hyperlink)
ActiveWorkbook.FollowHyperlink Address:="https://eportal.incometax.gov.in/iec/foservices/#/TaxCalc/calculator"

Private Sub ButtonHyperlink()
On Error Resume Next
fmsgbox "After e-payment of Tax, the details of amount paid, Challan No., BSR Code, etc. should be filled in Schedule IT of Income Tax Return before submission of the return to claim the challan"
ActiveWorkbook.FollowHyperlink _
Address:="https://onlineservices.tin.egov-nsdl.com/etaxnew/tdsnontds.jsp"
End Sub
(this is already a listed bug)


Then on prefiljson sheet

goto line 87 and remove
 As Byte()
 
 and 
 goto line 2318 and type
 end function
 
 
 then remove 
 Application.CommandBars("Ply").Enabled = True
 (by finding ply) this is already a listed bug
 
 
 then if you click on "prefil json button", you will get to filters 423 which is already a bug

so remove 
.Filters.add "Json File", "*.json", 1

as well


Set sourceSheet = ThisWorkbook.Sheets("Taxes Paid and Verification")
and
Set a = ThisWorkbook.Sheets("TCS")
this one also shows 423 not found

keep on removing error files to reach the current bug
Comment 4 Julien Nabet 2024-05-30 14:37:11 UTC
Too long to proceed all the instructions, I expected a minimum file to reproduce this without following a long explanation.
Perhaps someone will take the time but prefer uncc myself here.
Comment 5 Rafael Lima 2024-06-12 14:03:58 UTC
(In reply to johnks from comment #3)
> Created attachment 194427 [details]
> file containing multiple macro bugs

When I open the file, I get a lot of "Unexpected symbol: Address." errors... and also other subsequent error messages.

I'd say there are multiple bugs to be fixed here. Having LO working with this file would be a great test case.

The main challenge is to reduce all these bugs to minimal test cases.

In this case, MessageBox is a form in the document and LMessageBox is a label. By inpsecting it with XRay the label supports service ooo.vba.msforms.Label, which in turn does not seem to support the TextAlign property:

Code pointers
/core/vbahelper/source/msforms/vbalabel.hxx
/core/vbahelper/source/msforms/vbalabel.cxx
/core/oovbaapi/ooo/vba/msforms/XLabel.idl
Comment 6 Buovjaga 2024-08-16 15:01:55 UTC
Please give the password for the spreadsheet, so we can save it according to your instructions. I just wasted some time making the requested changes and then could not save it.
Comment 7 johnks 2024-08-23 08:36:59 UTC
(In reply to Buovjaga from comment #6)
> Please give the password for the spreadsheet, so we can save it according to
> your instructions. I just wasted some time making the requested changes and
> then could not save it.

i do not have password of these files. these are government department provided files which users are supposed to prepare tax returns on. They do not give passwords for files.

i don't know how to help you with this.

I just opened the file in windows>word and i was able to change add name and save it.  if you are saying you need password to save the file in libreoffice calc,  i opened the file, added middle name and saved it. it did not ask me for password.