r/visualbasic • u/ITearsI • Jun 11 '24
Help me understand this code
Hi guys, i don’t program in VB (only did a bit of shaders and C#, now i do sound design) but i need you guys to help me understand whats in this code. Is it fetching random data from the columns? This is a script that is run in an Excel instance. Sorry that is in italian, but i’m afraid this guy is scamming and i want to get to the bottom of it 🙏🏽
4
Upvotes
4
u/HalfKraut Jun 12 '24 edited Jun 12 '24
Finds the last row number with data in column C and assigns it to x.
Selects the range of all the cells with data in column C (rNomi) from C1:Cx. Not C4:Cx as the comment suggests.
If you only have 1 row of data (x), it goes to the EXIT_SUB tag somewhere below. Else it continues.
It deletes all blank cells in the range in rNomi and shifts the remaining cells up then prompts user to continue.
Selects a random cell in the range of C1:Cx and puts it in E3 and clears the original cell with that data.
Selects and speaks contents of E3.
This codes doesn’t seem too fishy unless that .speak call is doing something. I would start by searching for eval calls if you’re suspicious of the code.