Thread
:
Inputbox() Sum() MsgBox()
View Single Post
#
1
Posted to microsoft.public.excel.programming
Nigel
external usenet poster
Posts: 923
Inputbox() Sum() MsgBox()
Try this modification........
Sub DumbAss_Click()
Dim AreaClick As Range
Dim AreaSum As Long
Windows("how spent 73104rev").Activate
Sheets("ITA").Select
Set AreaClick = Application.InputBox(prompt:="Please click on area to sum",
Title:="Auto Sum", Type:=8)
AreaSum = WorksheetFunction.Sum(AreaClick)
MsgBox (AreaSum)
End Sub
Cheers
Nigel
"Dim DumbAss as Name" <Dim DumbAss as
wrote
in message ...
Can anyone help me? I am simply trying to have a range inputbox and then
have
the sum of that range pop up in a message box.
This is what I have. Do I need a (for each cell in range statement)? If so
how do I set that up? Any help thanks in advance.
Private Sub DumbAss_Click()
Dim AreaClick As Range
Dim AreaSum As String
Windows("how spent 73104rev").Activate
Sheets("ITA ").Select
Set AreaClick = Application.InputBox(prompt:="Please click on area to
sum",
Title:="Auto Sum", Type:=8)
Set AreaSum = WorksheetFunction.Sum(AreaClick)
MsgBox (AreaSum)
End Sub
Reply With Quote
Nigel
View Public Profile
Find all posts by Nigel