You got the for - next loop syntax wrong. Please read how it works here: https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/for-next-statement
I've tried to fix things and it seems to work now.
I'm not sure why you needed the sum and minimum variables.
You can use a different sorting algorithm too. I picked bubble-sorting for its simplicity: in every iteration, you swap adjacent items if the left one is larger; this effectively makes the largest one rise to the top, just like bubbles in a fizzy-drink. :)
And here's the code:
Module VBModule
Sub Main()
rem --== Variables ==--
dim arrMarks(0 to 9) as Integer
dim i as Integer
dim p as Integer
dim tmp as Integer
rem --== Initalise the array ==--
for i = 0 to 9
Console.Write("Enter the " & i & ". input data into an array: ")
arrMarks(i) = Console.Readline()
next i
rem --== Bubble-sorting ==--
for i = 0 to 8
for p = 0 to 8 - i
if (arrMarks(p) > arrMarks(p + 1)) then
tmp = arrMarks(p)
arrMarks(p) = arrMarks(p + 1)
arrMarks(p + 1) = tmp
end if
next p
next i
rem Console.WriteLine("you entered:"& arrMarks)
rem --== Print the result ==--
Console.WriteLine("The array after sorting:")
for i = 0 to 9
Console.WriteLine(i & ". " & arrMarks(i))
next i
End Sub
End Module
Disclaimer
I do not work with Visual Basic, so probably the code could have been done better by someone who uses Visual Basic regularly.