Re: Care to elaborate ? (NT)
Do
If strInputText = Then Exit Do
Set cell1 = Timesheet.Range("a8") 'need to loop this lot till "cancel"
' cell1 = NextCell + 1
cell1 = InputBox("Enter employees name")
Set cell2 = Timesheet.Range("b8")
cell2 = InputBox("Enter hours worked")
Set cell3 = Timesheet.Range("c8")
Timesheet.Range("c8").Formula = "=$b$5*b8"
Loop Until (InputBox = Cancel)
Get the idea I hope
Tony
Is this what you need ?
Do
If strInputText = Then Exit Do
Set cell1 = Timesheet.Range("a8") 'need to loop this lot till "cancel"
' cell1 = NextCell + 1
text1 = InputBox("Enter employees name")
If text1<>"" then
cell1 = text1
else
Exit Do
End If
Set cell2 = Timesheet.Range("b8")
cell2 = InputBox("Enter hours worked")
Set cell3 = Timesheet.Range("c8")
Timesheet.Range("c8").Formula = "=$b$5*b8"
Loop Until (InputBox = Cancel)
Juan Pablo
Set cell1 = Timesheet.Range("a8") 'need to loop this lot till "cancel" ' cell1 = NextCell + 1 cell1 = InputBox("Enter employees name") Set cell2 = Timesheet.Range("b8") cell2 = InputBox("Enter hours worked") Set cell3 = Timesheet.Range("c8") Timesheet.Range("c8").Formula = "=$b$5*b8"
Set cell1 = Timesheet.Range("a8") 'need to loop this lot till "cancel" ' cell1 = NextCell + 1 cell1 = InputBox("Enter employees name") Set cell2 = Timesheet.Range("b8") cell2 = InputBox("Enter hours worked") Set cell3 = Timesheet.Range("c8") Timesheet.Range("c8").Formula = "=$b$5*b8" : Loop Until (InputBox = Cancel) : Get the idea I hope