Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple Calculator Problem | Excel Worksheet Functions | |||
Can I make a simple fill-in calculator for webpage using Excel? | Excel Discussion (Misc queries) | |||
Calculator | Excel Discussion (Misc queries) | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Make it more simple or intuitive to do simple things | Charts and Charting in Excel |