.vb

What is a .vb file?

Visual Basic .NET Source File · Code and data · Microsoft · 2002

A .vb file is Visual Basic .NET source code, Microsoft's approachable language for the .NET platform. It is common in business applications, Office automation and Windows desktop tools.

Category
Code and data
MIME type
Type
Plain text
Is a .vb file safe to open? Caution. A .vb file is program source. Compiling and running it executes its code; review unfamiliar files first.

What is a .vb file used for?

Visual Basic .NET replaced classic Visual Basic 6 in 2002, moving the language onto the .NET runtime alongside C#. The two compile to the same bytecode, so a .vb project can use the whole .NET library ecosystem.

Classic VB6 used .bas, .frm and .cls files instead, so a .vb file is nearly always the modern .NET flavour. The files are plain text and open in any editor; Visual Studio gives the full experience.

What opens a .vb file?

The .vb format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • Visual Studio
  • VS Code
  • any text editor

macOS

  • VS Code
  • any text editor

Linux

  • VS Code
  • any text editor

Open a .vb file step by step

  1. Confirm the file really is a .vb. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with Visual Studio or VS Code.
  3. On Mac, use VS Code or any text editor.
  4. On Linux, try VS Code or any text editor.
  5. Still stuck? Convert the .vb to exe (compiled), which opens more widely.

Why can't I open my .vb file?

Almost always because no installed app understands VB.NET. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .vb at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

How to convert a .vb file

You can convert a .vb file to exe (compiled), dll using a conversion tool or the export menu of an app that opens it.

VB.NET has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.

Frequently asked questions

What is a .vb file?

A .vb file is Visual Basic .NET source code, Microsoft's approachable language for the .NET platform. It is common in business applications, Office automation and Windows desktop tools.

How do I open a .vb file?

Any text editor shows the source. To build and run it you need the .NET SDK, and Visual Studio on Windows is the usual environment.

Is VB.NET the same as Visual Basic 6?

No. VB.NET (in .vb files) is a .NET language introduced in 2002. VB6 is the older, unrelated runtime whose source lived in .bas, .frm and .cls files.

Is VB.NET still used?

Yes, especially in business software and internal tools. Microsoft keeps it supported on .NET, though new features now land in C# first.

Related formats

Sources

Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.