Skip to content

Object properties assignment bug and WITH bug #4

@PELock

Description

@PELock

I'm testing right now everything I can find (from the official help file)

Local $oExcel = ObjCreate("Excel.Application")
$oExcel.visible = 1
$oExcel.workbooks.add

With $oExcel.activesheet
    .cells(2, 2).value = 1
    .range("A1:B2").clear
EndWith

$oExcel.quit

It throws error:

"e8.au3" (2:8) : ==> Expected function call or assignment.:
$oExcel.visible = 1
$oExcel^ ERROR

And another associated bug, I've commented out the assignments:

Local $oExcel = ObjCreate("Excel.Application")
;$oExcel.visible = 1
;$oExcel.workbooks.add

With $oExcel.activesheet
    .cells(2, 2).value = 1
    .range("A1:B2").clear
EndWith

$oExcel.quit

And now it throws:

"e8.au3" (5:1) : ==> Keyword 'With' not valid at the start of a line.:
With $oExcel.activesheet
^ ERROR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions