I have a C# application that I manually run every morning that functions based off of the values that I select from the Institution Name column. Any values that are selected when I press the Put Files button will push files from a folder into a designated folder, any files I select when I press the Get Files button will retrieve files from a designated folder and place them into an assigned folder. I am currently trying to automate this process by using VBA. For a high-level overview of what I would need to make this possible, I would need code to:
- Automatically open my C# application (Completed)
- Code to select the values (Incomplete)
- Code to wait for the C# application to finish running before continuing with the rest of the macro (Completed)
Since the certain values that will be pressed for each run of Put Files and Get Files will be fixed, I was wondering if there was a way to get VBA to automatically select the values for myself once I run the code since it won't vary. Thanks.
Edit:
The below code is what I use to locate and open the C# application. As I now understand it thanks to Christopher Hamkins, I will need to access WinForm as an object and manipulate it in order to highlight the necessary values.
Dim fileName As Variant
Dim filePath As String
Dim fso As Object
Dim sfile As String
Set fso = CreateObject("shell.application")
filePath = "C:\Dropbox (###)\###\###\###\"
fileName = Dir(MyPath & "### UI*")
If fileName <> "" Then
fso.Open (filePath & fileName)
End If