Try this

santhosh kumar replied to srinivas reddy at 04-Jul-08 02:02
    Hi,


Public Sub UserForm_Initialize()

t = (Mid(time, 1, 2))  ' set the value of t to the current time

If t = "08" Or "09" Then ' if the "t" variable contains a 0, remove it
t = Right$(t, 1)
End If
ccount = Range("B" & t).Value ' set the values of the activity counters to what is
pcount = Range("C" & t).Value ' currently in the cells
End Sub


   Regards,
   Santhosh


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  How to assign values Dynamically to Range Statement - srinivas reddy  03-Jul-08 09:51 9:51:18 AM
      solution to assigning 2 vals - Umapathy Kaliaperumal  03-Jul-08 09:59 9:59:36 AM
          Reply - srinivas reddy  04-Jul-08 05:22 5:22:21 AM
      Try this - Jason S  03-Jul-08 10:00 10:00:08 AM
      range - sundar k  03-Jul-08 12:00 12:00:20 PM
      Try this - santhosh kumar  04-Jul-08 02:02 2:02:59 AM
View Posts