More exercises

Exercise: Place setting items to the Web
Earlier, you did the place settings exercise. (If you didn’t, do it now.)

Modify it so that it outputs a Web page, as well as to the worksheet. Sample partial output:

Web page output

Upload your Excel file.

Hint: Some code that might be useful:

  1. Open ThisWorkbook.Path & ”\place-settings.html” For Output As #1
  2. Print #1, ”<h2>Place Settings</h2>”
  3. Print #1, ”<p><strong>Dishware</strong></p>”
  4. Print #1, ”<p>Dinner plates: ” & dinnerPlates & ”</p>”
  5. Close #1

(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)

Exercise: Price a computer lab: Web output
Earlier, you wrote a program to price a computer lab. If you haven’t done it, do so now.

Change the program to output a Web page, that includes the name of the client, and the date the program was run.

Input the name of the client, and the name of the output file from the worksheet:

Input

Sample output:

Output

Hint: This code might be useful:

  1. Open ThisWorkbook.Path & ”\” & outputFile For Output As #1
  2. Print #1, ”<h2>Lab Price</h2>”
  3. Print #1, ”<p>Prepared for: ” & client & ”</p>”
  4. Print #1, ”<p>Tables: ” & tables & ” units, $” & tablesCost & ”</p>”
As usual: indenting, good variables names, comments.

Upload your Excel file.

(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)