Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 3.04 KB

HELP.md

File metadata and controls

29 lines (18 loc) · 3.04 KB

Troubleshooting Guide

When writing code, it's normal to make mistakes. Some mistakes are caused by simple typos, or "syntax errors", while others may result from broader misunderstandings or oversights about the logic of our application or the capabilities of the underlying technologies. Sometimes mistakes are caused by flaws in the underlying technologies themselves, perhaps through a bad release.

These mistakes in software, or differences between intended and actual functionality, are known as bugs. And the process of identifying and fixing them is called debugging.

Getting Through It

Regardless of why an error is happening, it's important to stay calm and stay positive. There's a good chance the error is fixable! And that you aren't the only one who's ever seen it before. Plus, sometimes struggling through a tough problem can make the learning process more rewarding. That being said, don't spend too much time debugging on your own before asking for help.

Here is a methodical approach you can try on your own to get past any issue:

  1. Your first objective when encountering an error should be to communicate what is happening, and how it differs from your expectation about what should happen. Ways to help you communicate the issue include: writing down your observations, vocalizing your observations to yourself, discussing your observations with someone else, or preparing to write a question to post on an online chatroom or help forum.
  2. Once you have communicated the problem, your second objective is to identify its source and its cause. Use various VBA Debugging Tools to find out which line of code is causing the problem, and why.
  3. Finally, once you have identified the source of the problem, your objective is to fix it. Try one strategy at a time, using scientific method to determine whether or not that approach worked before trying another approach.

Getting Help

If you're not able to successfully debug on your own, its OK to ask for help. Here are a few sources of help you might try, in order of priority:

  1. Consult Professor Rossetti's VBA Notes.
  2. Consult Microsoft's official VBA Language Reference and Excel VBA Reference.
  3. Consult the Internet, leveraging search engines like Google and programming forums like Stack Overflow. Start your search terms with the words "MS Excel VBA" for more relevant hits.
  4. Consult with someone you know, like a classmate, friend, mentor, or the professor. Feel free to post and answer questions in the OPIM 557 Slack organization.
  5. Take a break and revisit the problem later. Sometimes a walk or shower or good night's sleep will bring a fresh perspective.

Giving Thanks

After receiving help from an outside source, remember to always attribute it via code comments.