This is some homework code and I am just starting to learn the basics of VB. I am getting an comp. error on the filename and pathname lines and was wondering anyone could help with this. \r\n \r\nThe error simply reads expected expression and I am not sure how to deal with that. Thank you in advance for your help! \r\n \r\n \r\n \r\n \r\nSub LULZ() \r\n \r\nfilename = Inputbox("Enter file name", , ) \r\npathname = inputbox("Enter path to file", , ) \r\n \r\nmyfile = pathname + Filename \r\n \r\nOpen myfile For Input As #1 \r\n \r\nn = 0 \r\nDo Until EOF(1) Or n >= 100 \r\nn = n + 1 \r\nInput #1, x \r\nIf x > 2 Then \r\nf = Cos(x) \r\nElse \r\nf = Tan(x) \r\nEnd If \r\n \r\nWith Worksheet(1) \r\n.Cells(n, 1).Value = x \r\n.Cells(n, 2).Value = f \r\nEnd With \r\n \r\n \r\n \r\n \r\n \r\n \r\nEnd Sub
This is some homework code and I am just starting to learn the basics of VB. I am getting an comp. error on the filename and pathname lines and was wondering anyone could help with this.
The error simply reads expected expression and I am not sure how to deal with that. Thank you in advance for your help!
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe