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

calculator

Status
Not open for further replies.

lalee5

Technical User
Oct 20, 2002
70
US
Need Help!


Is there a way to add a caculator to a form so the user can just click the calculator rather than using the key pad?


Thanks
Kay
 
How about this, I've never done it - pop up the standard calculator then after calculating the user can copy and paste the results back into a text box as needed.

This code will startup the calculator for you.

Dim oShell As Object
Dim nRet As Long

Set oShell = CreateObject("WSCript.shell")
nRet = oShell.Run("calc", , false)
Set oShell = Nothing


Maybe this helps you ?

 
You can popup the windows calculator with the following code.

Shell "Calc.exe", vbNormalFocus

However I don't know if you can return its calculated value to your program. Maybe with some API calls. You can go to and search for a calculator project that has been posted by someone else. With the code you can easily add the feature of returning values where you need them.

Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top