Macro to cut and paste from Excel to another application

  • Thread starter Thread starter Ralph W.
  • Start date Start date
R

Ralph W.

Not sure if anything like this can be done! We work with
a propriatary software product builds an SQL statement
with the data that we key in. It has an input box that we
key in numbers to, select an 'and' or 'or' option, then we
push a control button (titled ADD) to have the program
build the statement. An example would be I enter number
123 then select 'Add', place the cursor in the input box
again, enter 234, and repeat the process. The SQL being
built looks like -
Number = 123
or
Number = 234
or
Etc.
We receive a list in excel of many numbers and this
becomes a tedious manual cut and paste routine from excel
to the other program. Is there any macro commands that
will make the other program resond to a paste and then
enter command???
Thanks
 
Hi Ralph,
Not sure if anything like this can be done! We work with
a propriatary software product builds an SQL statement
with the data that we key in.

if you do not have a chance to write the sql-statement yourself then you
could try to punch the data in with "sendkeys" in VBA. Have a look at
VBA-Help on this.

However, if you want to do this, you have to know how to call the programms
for sql with VBA. If you know that you may find a way to directly create the
sql-statement and fire the execution. So, first try to find out what
possibilities your software offers by reading the manual or contacting
support etc.

arno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top