Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Crystal from VBA

Status
Not open for further replies.

jjd100

Programmer
May 30, 2005
19
CA
I would like to invoke a Crystal report from VBA and pass a few parameters to Crystal as well. Does anyone know how to do this?
 
It might not be the cleanest way to do so, but I know for sure that you can use the Shell Command, and then for passing parameters, could use use the SendKeys command?
 
invoking from the shell works, the send key isn't working. Any other ideas? lots of documentation using vb.net or vb6, how about vba? :-(
 
Which VB6 code you can't migrate to VBA ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are you using SendKeys? Can you paste your code here, maybe there's a typo or syntax error...

For instance, If I wanted to send keystrokes to Notepad, and already have a document open which says "Untitled - Notepad" in the menu bar, I could do this:

Code:
AppActivate "Untitled - Notepad"
SendKeys "Hello, world!"
SendKeys "{ENTER}"
SendKeys "{ENTER}"
SendKeys "That was two carriage returns!"

Of course, you can also tell how many times to send a particular string or character, as well.

Also, if it seems to buggy in your particular application, you can try using the MySendKeys API call function which Dev Ashish posted on his Microsoft MVP website. Just do a google search for MySendKeys, and it should be the 1st or 2nd link.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top