.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.

How to open 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. For a step-by-step walkthrough, see how to open a .vb file.

Windows

  • Visual Studio
  • VS Code
  • any text editor

macOS

  • VS Code
  • any text editor

Linux

  • VS Code
  • any text editor

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 file signature (magic bytes)

Programs recognise a .vb file by the bytes at the start of the file, not by its name. These are the signatures for VB.NET.

Hex signatureOffsetNote
(no fixed signature)0plain text; no fixed magic bytes

See the full magic-numbers reference for every format.

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: