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

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default How do I add a simple calculator ( Like the one found in accessori

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?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I add a simple calculator ( Like the one found in accessori

Steve

Excel is a giant calculator.....use it to calculate your item costs.

Just as fast to enter 100 in A1 and 234 in A2 and 651 in A3 then use the
Autosum button as it is to enter the numbers in a calcultor.

Have you thought about creating a shortcut to the Acessories Calculator and
sticking it on your QuickLaunch Toolbar?

OR you could add a macro to call up the Calculator and assign it to a button on
a toolbar.

Sub calc()
Dim taskID As Variant
On Error Resume Next
Shell ("C:\windows\system32\calc.exe"), vbNormalFocus
If Err < 0 Then _
MsgBox "Calculator is Missing"
End Sub


Gord Dibben MS Excel MVP

On Mon, 30 Jul 2007 13:32:03 -0700, Steve
wrote:

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?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default How do I add a simple calculator ( Like the one found in acces

Hello. May I ask a question about your code below, just for my general
edification?

Why was the taskID variable created but not used? I can't understand its
point.

"Gord Dibben" wrote:

Steve

Excel is a giant calculator.....use it to calculate your item costs.

Just as fast to enter 100 in A1 and 234 in A2 and 651 in A3 then use the
Autosum button as it is to enter the numbers in a calcultor.

Have you thought about creating a shortcut to the Acessories Calculator and
sticking it on your QuickLaunch Toolbar?

OR you could add a macro to call up the Calculator and assign it to a button on
a toolbar.

Sub calc()
Dim taskID As Variant
On Error Resume Next
Shell ("C:\windows\system32\calc.exe"), vbNormalFocus
If Err < 0 Then _
MsgBox "Calculator is Missing"
End Sub


Gord Dibben MS Excel MVP

On Mon, 30 Jul 2007 13:32:03 -0700, Steve
wrote:

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?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I add a simple calculator ( Like the one found in acces

Just cobbled together fromk something else and left it in.

Not needed, nor the path.

Sub calc()
On Error Resume Next
Shell ("calc.exe"), vbNormalFocus
If Err < 0 Then _
MsgBox "Calculator is Missing"
End Sub


Gord

On Mon, 30 Jul 2007 15:04:03 -0700, danhattan
wrote:

Hello. May I ask a question about your code below, just for my general
edification?

Why was the taskID variable created but not used? I can't understand its
point.

"Gord Dibben" wrote:

Steve

Excel is a giant calculator.....use it to calculate your item costs.

Just as fast to enter 100 in A1 and 234 in A2 and 651 in A3 then use the
Autosum button as it is to enter the numbers in a calcultor.

Have you thought about creating a shortcut to the Acessories Calculator and
sticking it on your QuickLaunch Toolbar?

OR you could add a macro to call up the Calculator and assign it to a button on
a toolbar.

Sub calc()
Dim taskID As Variant
On Error Resume Next
Shell ("C:\windows\system32\calc.exe"), vbNormalFocus
If Err < 0 Then _
MsgBox "Calculator is Missing"
End Sub


Gord Dibben MS Excel MVP

On Mon, 30 Jul 2007 13:32:03 -0700, Steve
wrote:

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?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default How do I add a simple calculator ( Like the one found in accessori



"Steve" wrote:

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?

  #7   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?




Reply
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 01:00 PM.

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

About Us

"It's about Microsoft Excel"