by Sisyphus » Fri Jan 20, 2012 9:17 am
Hello hutia,
The answer is hard to give truthfully. Your other system is some kind of database and most likely it is possible for VBA to write to its tables. But such a database consists of at least a few dozen tables which are carefully arranged to interact with each other and the forms that are its user interfaces. Only if you use the progam's own user interface can you be sure not to cause severe damage. If one can presume that there is a field on one of the screens of that system which is either blank or self-creating, and further presume that you can identify the table and cell that is linked to that particular field on the screen, then you might try and use VBA to write to that cell. But there is a good chance that the system will reject this interference, not allow you access or act in some other interruptive or even corruptive way. Databases are sensitive, to say the least, and, if they are mature, they are also protective of anything that might upset them, especially outside programs that try to write to their tables.
The answer is to create the program that writes to it not in Excel but within itself. It is quite possible that the system uses MS Access where VBA is built-in. But I strongly suggest that you give up the idea of accessing tables in that system from outside. This should be a one-way street. The system can import whatever it wants but no one can export to it.
Have a great day!
Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)