LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default How do I add a simple calculator ( Like the one found in accessori

Hi Chip,

I like your code, is there a way to force the calculator to show up on
specific position of the screen, if so, can you provide the code.

Thanks
Andy

"Chip Pearson" wrote in message
...
Steve,

If you can go for a bit of VBA, use code like the following. It will open
the Windows calculator and make it a child of Excel so it will float above
the worksheets as you work in Excel and will be ready to use.

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long

Public Declare Function SetParent Lib "user32" ( _
ByVal hWndChild As Long, _
ByVal hWndNewParent As Long) As Long

Sub ShowCalc()
Dim XLHwnd As Long
Dim CalcHWnd
XLHwnd = Application.Hwnd
Shell "calc.exe"
CalcHWnd = FindWindow("SciCalc", "Calculator")
If CalcHWnd 0 Then
SetParent CalcHWnd, XLHwnd
End If

End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)



"Steve" wrote in message
...
How do I add a simple calculator ( Like the one found in accessories) to
my
excel spreadsheet. I am doing my personal budgets and often would like
to
check how much several items will cost me but without have to go through
accessories to the calculator which disappears when I switch screens.

Is there a way to embedd one in a spread sheet?




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Calculator Problem Wheelz Excel Worksheet Functions 4 August 9th 06 07:41 PM
Can I make a simple fill-in calculator for webpage using Excel? tggr2000 Excel Discussion (Misc queries) 0 July 12th 06 10:15 PM
Calculator Terry Excel Discussion (Misc queries) 12 October 7th 05 10:54 AM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Make it more simple or intuitive to do simple things Vernie Charts and Charting in Excel 1 March 16th 05 04:01 AM


All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"