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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA and Calc.exe

Status
Not open for further replies.

vbaprogammer

Programmer
Sep 16, 1999
59
US
I would like to add Calc.exe to my VBA Word project. That is, the user can click a button on my form, and calculator will appear. Can I capture or control any buttons, menus, or textboxes in Calc using VBA? The user will make a calculation, which then must appear in the form textbox (for example, user clicks Paste, the amount is pasted into the form textbox, and then Calc.exe closes).

Perhaps there's a better method without using a DLL. I am not allowed to distribute DLLs (or ocx, etc) to our users.

Thanks.
 
If I were in your situation, I think I'd write a custom calculator form myself. It shouldn't be very hard, and you can then add any buttons you want.

I'm pretty sure you couldn't capture keystrokes or button clicks in an external .exe file, unless it provided an event interface or callback functions. And I'm pretty sure old CALC.EXE hasn't changed significantly since Win 3.1! :)
Rick Sprague
 
Thanks, Rick. That may be the way I have to go. There's some really good DLL and OCX files out there, but for the sake of our users machines (banks, lenders, etc.), we try to avoid adding anything more than necessary.

Makes it quite a challenge. Maybe someone can direct me to some free code.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top