Like this:

VB Code:
  1. Option Explicit
  2.  
  3. Private Sub Form_Load()
  4.   Shell ("C:\Windows\System32\cmd.exe /c  C:\Windows\System32\netstat -n >> C:\myfile.txt"), vbNormalFocus
  5. End Sub

then you could read it in and display it, or use shellexecute to open the file in notepad.