Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Can ChatGPT be used to document VBA Code

Can ChatGPT be used to document VBA Code

Scheduled Pinned Locked Moved Visual Basic
question
8 Posts 3 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    YSLGuru
    wrote on last edited by
    #1

    It's been 15 years since I did anything with VBA (in Excel) and I've been asked to document for non-technical users what an Excel Macro is doing. I can do that but it's going to be very time consuming not only b/c it's been so long since I messed with VBA but because the macro consists of many functions so a lot of jumping around and the author opted to not use parenthesis so when looking at the code you don't know if the thing on the right side of = is a variable or a function. Since ChatGPT is being promoted as being able to do just about everything I figured it should be able to do this yes? If anyone does know do you know what the proper request would be? What I would ask it to do and how it would get the VBA code to document it? Thanks

    J L Y 3 Replies Last reply
    0
    • Y YSLGuru

      It's been 15 years since I did anything with VBA (in Excel) and I've been asked to document for non-technical users what an Excel Macro is doing. I can do that but it's going to be very time consuming not only b/c it's been so long since I messed with VBA but because the macro consists of many functions so a lot of jumping around and the author opted to not use parenthesis so when looking at the code you don't know if the thing on the right side of = is a variable or a function. Since ChatGPT is being promoted as being able to do just about everything I figured it should be able to do this yes? If anyone does know do you know what the proper request would be? What I would ask it to do and how it would get the VBA code to document it? Thanks

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      Perhaps ask in the lounge? Not that I mind but I think that question is more about ChatGPT rather than VB. And more likely to get a response there.

      Y 1 Reply Last reply
      0
      • J jschell

        Perhaps ask in the lounge? Not that I mind but I think that question is more about ChatGPT rather than VB. And more likely to get a response there.

        Y Offline
        Y Offline
        YSLGuru
        wrote on last edited by
        #3

        Can an existing post be moved to another forum or do you have to just delete and re-create?

        1 Reply Last reply
        0
        • Y YSLGuru

          It's been 15 years since I did anything with VBA (in Excel) and I've been asked to document for non-technical users what an Excel Macro is doing. I can do that but it's going to be very time consuming not only b/c it's been so long since I messed with VBA but because the macro consists of many functions so a lot of jumping around and the author opted to not use parenthesis so when looking at the code you don't know if the thing on the right side of = is a variable or a function. Since ChatGPT is being promoted as being able to do just about everything I figured it should be able to do this yes? If anyone does know do you know what the proper request would be? What I would ask it to do and how it would get the VBA code to document it? Thanks

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You really need to ask ChatGPT. Also, I think you will find that most people here have a fairly low opinion of ChatGPT's abilities.

          Y 1 Reply Last reply
          0
          • L Lost User

            You really need to ask ChatGPT. Also, I think you will find that most people here have a fairly low opinion of ChatGPT's abilities.

            Y Offline
            Y Offline
            YSLGuru
            wrote on last edited by
            #5

            Considering I've not touched VBA in 15-20 year sand I didn't write the macro so I don't have any idea what it's supposed to do, yes. It's not that I couldn't do it but that it's a huge time suck that if I could pass off onto Chat GPT to do it I'm more than happy to.

            L 1 Reply Last reply
            0
            • Y YSLGuru

              It's been 15 years since I did anything with VBA (in Excel) and I've been asked to document for non-technical users what an Excel Macro is doing. I can do that but it's going to be very time consuming not only b/c it's been so long since I messed with VBA but because the macro consists of many functions so a lot of jumping around and the author opted to not use parenthesis so when looking at the code you don't know if the thing on the right side of = is a variable or a function. Since ChatGPT is being promoted as being able to do just about everything I figured it should be able to do this yes? If anyone does know do you know what the proper request would be? What I would ask it to do and how it would get the VBA code to document it? Thanks

              Y Offline
              Y Offline
              YSLGuru
              wrote on last edited by
              #6

              UPDATE: I found where someone else had used ChatGPT to document an Excel macro so I used the same question (with code pasted after) as they did and it worked. I still have to doublecheck it but according to the person who used it before me the thing correctly detailed every macro. That said I'm guessing the better the quality of the code the more likely ChatGPT will correctly document it.

              1 Reply Last reply
              0
              • Y YSLGuru

                Considering I've not touched VBA in 15-20 year sand I didn't write the macro so I don't have any idea what it's supposed to do, yes. It's not that I couldn't do it but that it's a huge time suck that if I could pass off onto Chat GPT to do it I'm more than happy to.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                YSLGuru wrote:

                I've not touched VBA in 15-20 year

                Interesting, about the same as me.

                Y 1 Reply Last reply
                0
                • L Lost User

                  YSLGuru wrote:

                  I've not touched VBA in 15-20 year

                  Interesting, about the same as me.

                  Y Offline
                  Y Offline
                  YSLGuru
                  wrote on last edited by
                  #8

                  Than I'm sure you can appreciate why one if they could avoid it would ass off documenting someone else's Excel Macro. It's one thing when it's your code but another when it's someone you don't even know; aren't familiar with how they code. And to top it off there is of course ZERO notes/documentation in the macro. I know that even a year from now I'm not always going to remember everything important about some code I created so I document it extensively going so far as to also include my thinking of why I choose to do something the way I did and that has saved my butt more than once. This wasn't ion VBA but some SQL code where my boss had me change some logic and a year later it was an issue and he wanted to know why it had been changed and because I documented that in the script I was able to say "because you told me on XX date to change it".

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups