To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=69252 Issue #|69252 Summary|Inconsistent handling of Basic With Statements Component|api Version|1.0.0 Platform|All URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|ENHANCEMENT Priority|P3 Subcomponent|code Assigned to|ab Reported by|terrye
------- Additional comments from [EMAIL PROTECTED] Mon Sep 4 18:13:22 -0700 2006 ------- Another incompatibity between VBA and OOoBasic FYI: i=1 With ThisComponent.Sheets(i) ' or ActiveWorkbook.Sheet(i) in VBA MsgBox .Name i = 2 MsgBox .Name End With prints "Sheet2" and "Sheet3" in Calc/OOoB but "Sheet1" and "Sheet1" in Excel/VBA. (Ignoring the difference in offset which is a feature of the base count for Sheet collections varying), the main point to note that OOo treats With <x> as a symbolic macro substituting <x> before the appropriate bare dots. VBA treats With <x> as Dim tmp000x=<x> then substitutes tmp00x before the appropriate bare dots. In otherwords, VBA evaluates With by value and OOoB evaluates it by reference. This difference can cause nasty migration surprises, and the value form also generates a lot more efficient runtime Pcode. The basic compiler should be changed to be consistent with VBA at least for the Option Compatible mode. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]