Can I switch my old monitor back and forth between my desktop pc (Win XP) and my Nextbook tablet (Win 8.1)using a docking station? or cables

Can I share a monitor (an old Dell LCD w/ D-Sub vga connection) between my old desktop (Dell Optiplex running Windows XP) and my Nextbook tablet (running Windows 8.1)? I want to disconnect the old one from the internet and use only for running software I can’t use on the tablet, while using the tablet to watch youtube ( not at the same time) Would a docking station make it easy to switch the monitor between the 2 computers?