Dim range1 as range
Dim ws as String
ws = "Sheet1"
set range1 = worksheets(WS).range("B91:B" & g)
MsgBox Application.WorksheetFunction.Sum(Range1)
or
Dim range1 as Range
Dim ws as Worksheet
set ws = Worksheets("Sheet1")
set range1 = WS.range("B91:B" & g)
MsgBox Application.WorksheetFunction.Sum(Range1)
--
Regards,
Tom Ogilvy
"Spammastergrand" wrote in message
...
WS is a variable not a sheet name. I don;t want to hard code the sheet
name
since they'll be working with various months like Jan Feb, etc