<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Error in sheet Names property (Option VBASupport 1)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=136233">136233</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Error in sheet Names property (Option VBASupport 1)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.0.0.3 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Calc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sokol@comec92.ru
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
The sheet Names property returns the names of the document, not the sheet

Steps to Reproduce:
1.Open TestNamedRange.ods.
  There are 2 Names in document:
  - Doc_name. Scope: Document
  - Sheet1_name. Scope: Sheet1 (sheet)

2. Run document Basic Macro Standard.Module1.Test1

Option VbaSupport 1
Sub Test1
  Dim VBAWorksheet, VBAWorksheetName
  VBAWorksheet=ThisWorkbook.Worksheets("Sheet1")
  For Each VBAWorksheetName In VBAWorksheet.Names
    Msgbox VBAWorksheetName.Name
  Next VBAWorksheetName   
End Sub



Actual Results:
Result of Msgbox - Doc_Name

Expected Results:
Sheet1_Name


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 6; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>