sanantonio
Board Regular
- Joined
- Oct 26, 2021
- Messages
- 124
- Office Version
- 365
- Platform
- Windows
Hi All,
Apologies in advance some of the code is in Portuguese as this is a macro borrowed from my colleagues in one of our Portuguese offices. Folha = Sheet. I can't decipher what the "lr" or "i" would be in English though?
My Portuguese colleagues are using this excel macro to load data into a browser based piece of software that is unique to our business. We have the same piece of software, albeit in English(!). But when I run the macro all it seems to do is minimize my excel (The line Application.WindowState = xlMinimized presumably) but nothing else seems to happen.
Can anyone identify what each line of code is actually doing? I'm used to coding vba to SAP and there's a lot of code involved that lets you know when the excel is talking to SAP, I expected something similar here but it seems very very basic.
Apologies in advance some of the code is in Portuguese as this is a macro borrowed from my colleagues in one of our Portuguese offices. Folha = Sheet. I can't decipher what the "lr" or "i" would be in English though?
VBA Code:
Sub SendKeysWFM()
Dim lr As Long
Dim i As Long
lr = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = ActiveCell.Row To lr
'Folha5.Cells(i, 2).Copy
Application.WindowState = xlMinimized
Application.SendKeys ActiveSheet.Cells(i, ActiveCell.Column), True
Application.SendKeys ("~"), True
Next i
Application.SendKeys "{NUMLOCK}"
End Sub
My Portuguese colleagues are using this excel macro to load data into a browser based piece of software that is unique to our business. We have the same piece of software, albeit in English(!). But when I run the macro all it seems to do is minimize my excel (The line Application.WindowState = xlMinimized presumably) but nothing else seems to happen.
Can anyone identify what each line of code is actually doing? I'm used to coding vba to SAP and there's a lot of code involved that lets you know when the excel is talking to SAP, I expected something similar here but it seems very very basic.