• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Troubleshooting

One of the biggest problems that can occur is simply using the wrong method to do something. The innerHTML method is often confused with the innerTEXT method. If you accidentally used the innerText method to write HTML code, the HTML code would be converted by the innerText method so it could be displayed in the web page. When you see your HTML code being displayed in the browser, you might be led to believe you entered incorrect HTML code instead of having selected the wrong method.

The Visual Basic editor is very good at catching many formatting errors such as misplaced end quotes on a string or an extra parenthesis. When things do go wrong it is hard to determine where they might have occurred which makes debugging difficult. To make debugging easier you can insert your own simple breakpoints to alert you when you have reached a certain line of code. With VBA you can simply use message boxes saying "Made it here" to alert you to the fact that it reached the line of code where your breakpoint was with no errors. By moving your breakpoint around you can eventually prove that when you place your message box before line x your message box will appear, and if you place your message box immediately after line x it doesn't appear, which identifies line x as a problem.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint