Noted.
For my project I'm going to maintain one Excel File for easier distribution.
For the purpose of uploading file using Services for Object, I'm going to use the following steps:
- VBA to create a VBS file with the instruction line to loop and check for the Import File dialog box. If found, activate it then sendkeys five tab keys, the fullpath string of the file to be uploaded and enter key to the dialog box. The fullpath will be stored in a string variable which takes its values from the VBS file argument send by the VBA in the next step.
- VBA will shell WScript to run the VBS file with the fullpath string as its argument.
- VBA will execute the procedure to bring up the dialog box in SAP.
- If everything go as planned, the file will be uploaded to SAP and VBA will kill (i.e delete) the VBS file.
For the purpose of testing steps 2 and 3, I have manually created the VBS file. It works. Now I'm working on the codes to automate the creation of the VBS file (step 1) and delete it (step 4).
The setback is, if the VBS is interrupted before it finishes executing, VBA and Excel will hang until the Import File dialog box is manually closed in SAP.
Anyway, thanks again for your replies and guidance.
Regards,
Sayuti