Userform and Macro code

S

sunspot27

I have the following code to switch to an open application (ACT! database)
and send the following keys. This works fine as a stand alone macro however,
when i add the same code to a button in a User Form, it doesnt work.

Can someone help?

Sub Export()

'Does an export of the ACT database

AppActivate ("ACT!"), True
Application.SendKeys ("%f"), True
Application.SendKeys ("d"), True
Application.SendKeys ("e"), True
Application.SendKeys ("{TAB}"), True

End Sub
 

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

Top