View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Converting strings to Sum worksheet function and control variables

Hi
change it to
Dim range1 as range
set range1 = worksheets(cstr(WS)).range("B91:B" & g)
MsgBox Application.WorksheetFunction.Sum(Range1)

--
Regards
Frank Kabel
Frankfurt, Germany

Spammastergrand wrote:
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