Forum Discussion

15 Replies

  • ber999's avatar
    ber999
    Brass Contributor

    Hi, 

     

    thank you for the notice. The error message is "Der
    angegebene Wert ist außerhalb des zulässigen Bereichs."

    ber999 

    • ber999 

      I did see the screenshot (and I understand German), but that doesn't help. I'd need to see (a copy of) the workbook.

      • ber999's avatar
        ber999
        Brass Contributor

        Hi Hans,

         

        I have tested the my code with the worksheet and the single Autoshape. And, it works. Consequently, the problem should be the structure of the worksheet. However, the worksheet in question is not for public use. So, I will try to find a solution.

        HansVogelaar 

  • ber999 

    For example:

        Dim strText As String
        strText = ActiveSheet.Shapes(1).TextFrame2.TextRange.Text

    If you know the name of the shape, you can use that: change Shapes(1) to Shapes("Flussdiagramm: Prozess 1")

    • ber999's avatar
      ber999
      Brass Contributor

      Hi Hans,

       

      this is the interesting part of the code I have used:

      .

      Dim exlShpOuter As Excel.Shape

      .

      .

      Set exlWssrc=ActiveWorkbook.Worksheets.Item("AS")

       

      .

      For Each exlShpOuter In exlWsSrc.Shapes

      Select Case exlShpOuter.Type
         Case Office.msoLine
         Case Office.msoGroup
       .

       .

        Case Else
      .

       

      vbaText = exlShpOuter.TextFrame2.TextRange.Text

      .

      .

      The error messagebox  is attached.

       

       

       

       

       

      HansVogelaar 

    • ber999's avatar
      ber999
      Brass Contributor

      Hallo Hans,

       

      thank you very much. I have found this method at several places in the internet. But, why does not work?

      HansVogelaar 

Resources