HOW TOs

No worries. We got you.

Here you will find solutions to many common problems. Let me know via Teams if any of these solutions does not work for you. I will correct it for everyone and you will get a bug bounty.




I want to rename my project folder (the one I submit in myFiles)

  • Fully exit Visual Studio
  • Change the name of the unzipped folder where you saved your project (the 'submission folder'). Zip it and submit it. You may stop here.
  • If you also want to change the file and folder names inside the submission folder, follow carefully these instructions. Failure to follow might corrupt your project and make it unrecoverable.
  •  Quit VS.
  • Unzip and open the submission folder
  • Delete the .sln or .slnx file
  • Rename the project folder, which is the folder inside the submission folder and contains many other files.
  •  Start VS by clicking the .vbproj file
  • In the 'solution explorer' window rename the solution, the project file (not 'MyProject', the one with 'VB' in the icon), and the .xlsx
  •  Save VS. Done!

Watch a complete example of this process at the beginning of the video for H03


I want to double-check my submission and the download is not working

Go to myFiles, download your submission on your desktop, unzip it, and run it in a trusted location. That is what the grader will do.
If you do not unzip, your program will not run.


I have unzipped the folder, it is in a trusted location (including subfolders), and yet VS tells me that it is untrusted

This is a sneaky one. Your instance of Windows has two Desktops, usually identical to each other. They are super-easy to confuse.  One is saved on the C: drive of the computer you are using, and the other is saved in the cloud.  In general, VS does not like to work with remote folders, hence the 'untrusted' message you see.  You think your project is in your trusted local desktop, and instead it is saved in the untrusted cloud one. Good news: there is an easy fix.
Save all > Quit VS > copy the VS folder that contains your work > open file explorer and type in the top textbox:  C:\Users\<your uva userid>\Desktop > Enter > You will be transported to your local desktop > paste your project there. If the local desktop is trusted (with subfolders) and your projects is unzipped, it will run.


Blue Screens / Fatal Errors / VS hangs forever / VS (not your code) crashes at start

If you have not done so already, follow the first time set up procedure.
Else it is probably a ghost instance of Excel creating problems:

  • Click at the same time ctrl+alt+del (or right click the taskbar) > Task manager > Look carefully for all running instances of Excel. If you find any, select them and "end task"
  • Sometimes this is sufficient to unstuck VS. Else, quit and re-start it.

"Unable to find code signing certificate"

If you see an error message similar to the one above, there is an easy solution

  • Turn on Visual Studio
  • In the solution explorer, right-click on the project (square icon, 'VB' inside) > Properties > Signing > Create Test Certificate >  leave empty  (you do not need a password) > OK
  • Close the project window
  • In the top tab in VS, go to Build > rebuild solution
    Done!

"My user input box has the wrong title"

  • Add a second parameter to the code that creates the input box. That will be the title.
    InputBox(prompt, [title], [default])
    - prompt: This is the message displayed in the input box. It's a required parameter.
    - title: This sets the title for the input box (use double quotes). If omitted, the application name is used.
    - default: This is the default response that appears in the text box. If omitted, the text box is empty

"Where is the stuff I left on my desktop? It is gone!"

Ah! Windows has two desktops.  They look identical. But they are quite different. This can be confusing.

  • One is the LOCAL desktop.  Local means that it is saved on the computer you are working on. Each computer has a different local desktop. If you save your files on the local desktop of one computer you will not see those files on the desktop of another computer.
    The local desktop is
    C:\Users\<yourComputingID>\Desktop
  • The other desktop is a VIRTUAL one. It is stored remotely, in your OneDrive. You can retrieve your virtual desktop and its contents from any computer.
    C:\Users\<YourComputingID>\OneDrive\Desktop
    Sounds like a good idea, except that VS does not like to work off remote folders. So, while you work with VS, it is a good practice to save your project folders on your LOCAL desktop. When you are done, copy them on Box, Dropbox, Google drive or similar, so they are easy to retrieve from any computer.
  • If you want to turn off the OneDrive virtual desktop feature, try to do the following - you might not be able to do them on a lab PC :

  • Click the OneDrive cloud icon in the system tray (bottom right corner of your screen) and select "Settings."
  • Unlink Your PC: Go to the "Account" tab > click "Unlink this PC."
  • In the settings window, under the "Settings" tab, uncheck "Start OneDrive automatically when I sign in to Windows."
  • Close OneDrive: Right-click the OneDrive icon in the system tray again and select "Close OneDrive."

"This file/folder cannot be trusted" (or similar trust-related messages)

You need to make the folder where you save your projects a "trusted" location.

  • Quit VS
  • Open a blank Excel workbook.
  • Go to File > Options > Trust Center > Trust center settings > Trusted Locations
  •  Add new location (the folder you want to be trusted) > check the sub-folder option > OK
    If you work on your desktop, meaning if your project is saved on your desktop and you run it unzipped there, then the folder to trust is C:\Users\<yourUVAuserID>\Desktop

Done! But you will need to repeat this for all computers on which you work. You trust a specific folder on a specific PC. If you change PC, the equivalent folder ( even if it has the same name) is not trusted.


"My work is saved on a computer I cannot access: somebody else is working on it"

"Where do I save my partial/unfinished work?"

If you saved your work on your desktop on a PC in a lab, you need to wait until to regain access to that specific PC.
To avoid that inconvenience in the future, save your incomplete/unfinished homework in myFiles so you can retrieve it from any computer. Exit VS, zip your folder, and save it in myFiles.  When you are ready, upload your finished homework using the same filename: it will overwrite the previous version.


Errors working in lab 300 - "Cannot connect"

  • Lab 300 works on a different technology than the other labs.  There is an easy solution: just go to another lab.

Maximum call stack size exceeded

This typically happens when there is an infinite loop of some sort that fills up all available memory on your computer

  • If you see this in ADS, quit and restart.
  • If you see this in VS, stop the program, figure out where is the loop, and modify it so that it is not infinite (example: Sub A calls Sub B that calls Sub A....).