Questions tagged [vb6]

Visual Basic 6.0 (VB6) was the final COM-based version of the VB programming language and IDE, last updated in 2004. It is the predecessor to the modern VB.NET.

Visual Basic 6.0 () is the third generation event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming model. It is also considered a relatively easy programming language to learn and use, because of its graphical development features and BASIC heritage.

The final release of the COM-based Visual Basic was version 6 in 1998. It was last updated in 2004 through Service Pack 6.

  • The designated successor language is . For things like writing COM addins for Microsoft Office you would use or .
  • Support for the VB6 IDE ended on April 8th, 2008.
  • The runtime is supported as part of Windows Vista, 7, 8, 8.1 and 10 and Windows Server 2008, 2012 including R2 and 2016.

Resources:

10799 questions
41
votes
6 answers

What is the difference between VB and VBScript

What is the difference between VB and VBScript?
DNR
  • 3,706
  • 14
  • 56
  • 91
41
votes
12 answers

Block commenting VB/VB.NET code

How to comment multiple lines of code/block of code in VB?
Pradeep
38
votes
4 answers

Hex-Value in Visual Basic

Can someone just help me refresh my mind? How do you specify hex values in a Visual Basic 6 / VBScript Source? It's not 0xABCD as it is in C++, that's what I can remember... It was something similar... But what?
BlaM
  • 28,465
  • 32
  • 91
  • 105
37
votes
1 answer

Unload a COM control when working in VB6 IDE

Part of my everyday work is maintaining and extending legacy VB6 applications. A common engine is written in C/C++ and VB6 uses these functions in order to improve performance. When it comes to asynchronous programming, a C interface is not enough…
Vincent Robert
  • 35,564
  • 14
  • 82
  • 119
37
votes
10 answers

Is there any VB6 to C# migration tool?

Does anyone know a way to convert from VB6 code to C#? Is there a tool that can do this for me? Is there any migration process that I can follow to do this?
basl
  • 501
  • 1
  • 4
  • 3
37
votes
1 answer

Why VB6.0 form displays as C# form?

I have a COM DLL which has a form. This DLL is consumed by a C# application. I have enabled Visual Styles for my C# application. I don't want the Visual Styles be applied for COM DLL's form. But when I run my application and lanuch COM DLL's form,…
Adavesh
  • 557
  • 5
  • 9
36
votes
2 answers

Installation of VB6 on Windows 7 / 8 / 10

I have been having problems installing VB6 on Windows 7. I realize it is a legacy IDE and my research on the net hasn't been that much of help. Every time I attempt to install VB6 on Windows 7, besides the alert notifying me of compatibility issues,…
EthiopionZA
  • 797
  • 2
  • 9
  • 13
35
votes
9 answers

What does "Method '~' of object '~' failed" at runtime mean?

I'm trying to run a legacy VB6 application on my desktop (it doesn't have a user interface, being a command-line app), and when I do, I get a message box saying Run-time error '4099': Method '~' of object '~' failed This means nothing to me; does…
Cyberherbalist
  • 12,061
  • 17
  • 83
  • 121
34
votes
2 answers

Why do my PDB's for my VB6 project not match the generated dll?

I have a VB6 project and have enabled it to generate pdb files (this shows how to do that). However I can't debug with them and when I check them with symcheck I get this output: >SYMCHK: MyFile.dll FAILED - MyFile.pdb mismatched or not…
Sam Holder
  • 32,535
  • 13
  • 101
  • 181
33
votes
5 answers

Why would you ever use "On Error Goto 0"?

Why would you ever use "On Error Goto 0" in a VB6 app? This statement turns the error handler off and would mean that any error would crash the app. Why would this ever be desirable?
CJ7
  • 22,579
  • 65
  • 193
  • 321
33
votes
8 answers

VB6 equivalent of string.IsNullOrEmpty

I'm doing some work on a legacy application, and my VB6 skills aren't that great. I need to check whether a String field has been initialized and set to something other than null/nothing or an empty string. In C# I'd just do something like: if…
Justin Morgan - On strike
  • 30,035
  • 12
  • 80
  • 104
33
votes
5 answers

What does the Call keyword do in VB6?

There's some code in our project that looks a bit like this: Private Sub Method1() Call InnerMethod End Sub Private Sub Method2() InnerMethod End Sub Private Sub InnerMethod() '' stuff End Sub What's the advantage of doing Method1…
Ant
  • 5,150
  • 2
  • 33
  • 41
33
votes
1 answer

Variable iterating on itself - different behavior with different types

Please take a look at the latest updates at the end of the post. In Particular, see Update 4: the Variant comparison Curse I’ve already seen mates banging their head against the wall to understand how a variant works, but never imagined that I will…
A.S.H
  • 29,101
  • 5
  • 23
  • 50
33
votes
22 answers

When will it be impossible to support Visual Basic 6.0 applications?

In the last 3-5 years I have been renewing an insurance application and a commmercial integration toolkit based on Visual Basic 6.0. According to Microsoft's "It just works policy" the IDE is no longer supported after april 8th 2008. It still works…
Kb.
  • 7,240
  • 13
  • 56
  • 75
33
votes
16 answers

Has anyone had success with Visual Studio 6 on Windows 7?

VS6 popped off a series of errors before bombing out completely during install on Windows 7. I specifically need to get VB6 functioning on Windows 7. Anyone having any luck?
ajl
  • 704
  • 3
  • 11
  • 21