![]() |
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 |
All times are GMT +1. The time now is 06:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com