jazznaura
12-17-2007, 11:30 AM
hi all,
i'm a newbie and was playing around with input boxes and wrote this little code but can't get it to work.
anyone tell me where i've gone wrong?
can i use cell ref from a input box in this way?
thanks
Sub inputcell()
Worksheets("sheet1").Activate
Set icell = Application.InputBox(prompt:="Please click on the Date to be worked", Title:="Please Select A Cell", Type:=8)
Set endcell = Application.InputBox(prompt:="Please click on the last cell to be worked", Title:="Please Select A Cell", Type:=8)
icell.Select
Selection.AutoFill Destination:=Range("icell:endcell"), Type:=xlFillDefault
Range("icell:endcell").Select
Range("A1").Select
End Sub
i'm a newbie and was playing around with input boxes and wrote this little code but can't get it to work.
anyone tell me where i've gone wrong?
can i use cell ref from a input box in this way?
thanks
Sub inputcell()
Worksheets("sheet1").Activate
Set icell = Application.InputBox(prompt:="Please click on the Date to be worked", Title:="Please Select A Cell", Type:=8)
Set endcell = Application.InputBox(prompt:="Please click on the last cell to be worked", Title:="Please Select A Cell", Type:=8)
icell.Select
Selection.AutoFill Destination:=Range("icell:endcell"), Type:=xlFillDefault
Range("icell:endcell").Select
Range("A1").Select
End Sub