It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
Yesterday I had to type in 188 Excel spreadsheets some numbers. I’ve never learnt Visual Basic, thankfully I never had to teach it also 🙂 but it was something useful to try out for the specific task. That’s a stripped version of what came up:
Sub wrSheets() Dim sheetName Worksheets("FORVBA").Activate For i = 2 To 189 stri = CStr(i) sheetName = Range("Q" & stri).Value val = Range("H" & stri).Value With Worksheets(sheetName) .Range("Q38") = val End With Worksheets("FORVBA").Activate Next i End Sub
With VBA, Excel did the tedious task in one second. That was awesome. Of course I went online for all these things. The error messages were more cryptic than expected and, why .Range instead of just Range? Anyway it did my job so…