Results 1 to 20 of 45

Thread: Python dictionary in VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #21
    On thing happened!
    When I added some more rebars to Dictionary, it gave me error, because there is already with same key word element
    For ex.
     ' 1 rebars
        rebars.Add 0.28, "1x6"
        rebars.Add 0.5, "1x8"
        rebars.Add 0.79, "1x10"
        rebars.Add 1.13, "1x12"
        rebars.Add 1.54, "1x14"
        rebars.Add 2.01, "1x16"
        rebars.Add 2.54, "1x18"
        rebars.Add 3.14, "1x20"
        rebars.Add 3.8, "1x22"
        rebars.Add 4.91, "1x25"
        rebars.Add 6.16, "1x28"
        rebars.Add 8.04, "1x32"
        rebars.Add 10.18, "1x36"
        rebars.Add 12.57, "1x40"
        
        ' 4 rebars
        rebars.Add 1.13, "4x6"
        rebars.Add 2.01, "4x8"
        rebars.Add 3.14, "4x10"
        rebars.Add 4.52, "4x12"
        rebars.Add 6.16, "4x14"
        rebars.Add 8.04, "4x16"
        rebars.Add 10.18, "4x18"
        rebars.Add 12.57, "4x20"
        rebars.Add 15.21, "4x22"
        rebars.Add 19.63, "4x25"
        rebars.Add 24.63, "4x28"
        rebars.Add 32.17, "4x32"
        rebars.Add 40.72, "4x36"
        rebars.Add 50.27, "4x40"
    How could i fix it in VBA? Perhaps i have to use extra dictionary, ex. rebars2?
    Last edited by Einsener37; 03-15-2023 at 03:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •