Hello I'm new to VBA and I've put the following code in the VBA editor which I've got from a tutorial:
Public Sub Mijneersteprogramma()
Range("B2").Select
ActiveCel.Value = InputBox("Enter Waarde")
Range("B3").Select
Actievcel.Value = InputBox("Enter Waarde")
Range("b4").Select
ActiveCel.Value = InputBox("Enter Waarde")
Range("b5").Select
Actievcel.Value = InputBox("Enter Waarde")
Range("B6").Select
ActiveCel.Value = InputBox("enter Waarde")
Range("b7").Select
ActiveCel.Formula = "sum(B2..B6)"
ActiveWorkbook.SaveAs Filename:="Mijneersteprogramma.xls"
End Sub
When I run the code I get:error code 424 need object.
I done the step by step debugger and after putting a value in the Inputbox and clicked on Ok the error code apears
What is going wrong
Thank you for the answer
Marcel
Public Sub Mijneersteprogramma()
Range("B2").Select
ActiveCel.Value = InputBox("Enter Waarde")
Range("B3").Select
Actievcel.Value = InputBox("Enter Waarde")
Range("b4").Select
ActiveCel.Value = InputBox("Enter Waarde")
Range("b5").Select
Actievcel.Value = InputBox("Enter Waarde")
Range("B6").Select
ActiveCel.Value = InputBox("enter Waarde")
Range("b7").Select
ActiveCel.Formula = "sum(B2..B6)"
ActiveWorkbook.SaveAs Filename:="Mijneersteprogramma.xls"
End Sub
When I run the code I get:error code 424 need object.
I done the step by step debugger and after putting a value in the Inputbox and clicked on Ok the error code apears
What is going wrong
Thank you for the answer
Marcel