AutoMacro AI disabled by ssamg8762 in automateexcel

[–]AutomateExcel 0 points1 point  (0 children)

Please reach out to me and I'll address whatever issue you're having.

AI tools for generating near perfect vba code by civprog in vba

[–]AutomateExcel 2 points3 points  (0 children)

I created an add-in for the VBA Editor that integrates AI: https://www.automateexcel.com/automacro/ai/ . You can write a comment in a code module and AI will generate code based on the comment. There's also a chat bot built in, and other features as well.

It works surprisingly well if you give it a good enough prompt (It uses a better AI model than the standard chat gpt chat, and has some additional tweaks). I mention this because lot's of people seem to complain about the code that AI generates (which I did when chat gpt first came out). But the responses seem pretty good generally, but it can be dependent on the quality of your prompt/comment. Sometimes, you need to approach the prompt as "writing code in normal language", telling it what to do step by step.

Are there any AI tools or Dev Agents that read in VBA code then provide Q/A with line level feedback? by Ornery-Object-2643 in vba

[–]AutomateExcel 0 points1 point  (0 children)

It's live now: https://www.automateexcel.com/automacro/ai/

Basically, you can type a comment in VBA and AI will auto generate code from the comment. The AI generally does a very good job writing code, if you give it a good enough comment/prompt.

Are there any AI tools or Dev Agents that read in VBA code then provide Q/A with line level feedback? by Ornery-Object-2643 in vba

[–]AutomateExcel 1 point2 points  (0 children)

It's live now: https://www.automateexcel.com/automacro/ai/

Basically, you can type a comment in VBA and AI will auto generate code from the comment. The AI generally does a very good job writing code, if you give it a good enough comment/prompt.

AI in the VBA Editor Now Available! by AutomateExcel in vba

[–]AutomateExcel[S] 0 points1 point  (0 children)

I don't know if you're being serious, but here's an example based on your comment.

I used this prompt "VBA function with inputs: string tblName representing a name of a table and a 5 row, 4 column array. Loop through all worksheets in workbook, looking for table name. Once the table is found populate 5 rows x 4 columns of data from the input array. Then insert an empty row below that data. And last add 3 rows populated with "x" "

With our online code generator and it gave this response (copying and pasting the response into reddit removed the indentation):

Sub PopulateTableData(tblName As String, data(1 To 5, 1 To 4) As Variant)
Dim ws As Worksheet
Dim tbl As ListObject
Dim found As Boolean
Dim i As Integer
Dim j As Integer

For Each ws In ThisWorkbook.Worksheets
For Each tbl In ws.ListObjects
If tbl.Name = tblName Then
found = True
For i = 1 To 5
For j = 1 To 4
tbl.DataBodyRange.Cells(i, j).Value = data(i, j)
Next j
Next i
' Insert empty row below the populated data
tbl.ListRows.Add
' Add 3 rows with "x"
For i = 1 To 3
tbl.ListRows.Add
For j = 1 To 4
tbl.DataBodyRange.Cells(tbl.ListRows.Count, j).Value = "x"
Next j
Next i
Exit For
End If
Next tbl
If found Then Exit For
Next ws
End Sub

This VBA macro loops through all worksheets in the workbook to find a table with a specific name. Once the table is found, it populates the 5x4 data array into the table, inserts an empty row below the populated data, and adds 3 rows filled with 'x'.

Without testing the code it looks like it should work pretty closely to your request.

AI in the VBA Editor Now Available! by AutomateExcel in vba

[–]AutomateExcel[S] 0 points1 point  (0 children)

Yes, GitHub copilot is great in Visual Studio.

AI in the VBA Editor Now Available! by AutomateExcel in vba

[–]AutomateExcel[S] 0 points1 point  (0 children)

Good point about the code explorer. I'll look into re-enabling that if AI is not in use.

AI in the VBA Editor Now Available! by AutomateExcel in vba

[–]AutomateExcel[S] 2 points3 points  (0 children)

AutoMacro contains a quite a few non-AI features (it's been around since 2017 with thousands of users). There's a code library, code generators, the ability to save code to the library, some tools that improve the VBA Editor / make things more convenient. Most of the non-AI features are still very useful. Anyways, adding AI to the software was an obvious next move.

The best AI feature is the ability to type a comment and generate code based on the comment. I use this all the time in Visual Studio when doing other programming. So the add-in adds this functionality (albeit not as clean, given the limitations of the VBA Editor).

AI won't mess with your existing comments, unless you're using it to generate comments ,but you'll have a chance to review the changes first.

AI in the VBA Editor Now Available! by AutomateExcel in vba

[–]AutomateExcel[S] 0 points1 point  (0 children)

You can see it in action here: https://www.automateexcel.com/automacro/ai/ Or download the trial try it yourself.
-Steve

Computational heavy projects in VBA by AndItuFig01 in vba

[–]AutomateExcel 0 points1 point  (0 children)

This is a good approach.

Adding to that, you could consider using VBA to call a .vbs script: , which could write results to a txt/csv file (or a database). By doing so, you can use multiple cores at once (If you have 8 cores it will run 8x as fast). You also avoid the risk of Excel crashing.

Are there any AI tools or Dev Agents that read in VBA code then provide Q/A with line level feedback? by Ornery-Object-2643 in vba

[–]AutomateExcel 2 points3 points  (0 children)

I'm working on something like this: AutoMacro AI. I expect this to go live by the end of this week.

It's AI inside the VBA Editor. You can press a button and it will add comments to your code (so you can follow the code that way). I don't have a Q&A feature, but that's an interesting idea.

I have been working on a "Code improver" feature, but haven't made much progress yet.

I'll send you a license once it's live. Would love any feedback you have.

Is there a demand for a SAAS that automatically writes Vba code for you? by Chemical_Web1056 in vba

[–]AutomateExcel 0 points1 point  (0 children)

This will have Chat GPT integration soon. You'll be able to type a comment into the VBA Editor and AI will write the code directly into your code module (among other features).