View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pcscsr[_5_] pcscsr[_5_] is offline
external usenet poster
 
Posts: 1
Default subtotal problem


I have the following code which works well when I run the program fro
the "worksheet" module. However, if I try to run the main program fro
the "userform" module when I make my selections from my listbox, it doe
not work. Can someone help me with this..?

Sub sumthem()

dim i as long
dim rsum as single

For i = 1 to range("d800").end(xlup).row + 1
rsum = rnum + Range ("D" & i).value
If Range ("D" + 1).value = "" And Range (D" &
i + 1).Value = "" Then
Range("D" & i).value = rsum
rsum = 0
End if
next
end su

--
pcscs
-----------------------------------------------------------------------
pcscsr's Profile: http://www.excelforum.com/member.php...fo&userid=1200
View this thread: http://www.excelforum.com/showthread.php?threadid=27404