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
33
votes
1 answer

"Object library not registered" when adding Microsoft Rich Textbox Control 6.0 (SP6)

I try to add Microsoft Rich Textbox Control 6.0 (SP6) control via Project -> Components... in VB6 IDE. The control is present in the list of controls. When I tick it and click OK/Apply, I get Object library not registered error: Environment is…
Ilya Kurnosov
  • 3,180
  • 3
  • 23
  • 37
31
votes
2 answers

IsDate function returns unexpected results

How come IsDate("13.50") returns True but IsDate("12.25.2010") returns False?
mwolfe02
  • 23,787
  • 9
  • 91
  • 161
30
votes
24 answers

Your favorite Visual Basic 6.0 tools and tips

This is somewhat related to a similar post, but that post was Visual Studio 6 in general and a lot of the suggestions didn't apply to Visual Basic 6.0. Suggest or vote for tools/tips. Please one tool/tip per post so that everyone can vote on them…
Clay Nichols
  • 11,848
  • 30
  • 109
  • 170
30
votes
5 answers

SQL Server not configured for data access

I'm running a SQL Server 2005 database from a VB 6 Application. I connect to the database through an ODBC DSN. I renamed the computer on which I'm running the default instance of SQL server from 'Software' to 'IT'. I then ran the sp_dropserver and…
Jack Njiri
30
votes
11 answers

Convincing legacy application VB6 developers to make the switch to C#

I know this question could be similar to others but really I'm looking for reasons why VB6 developers should switch to C#. My company recently approved project to be written in C#, so we have a lot of VB.Net programmers, however, we have some…
webdad3
  • 8,893
  • 30
  • 121
  • 223
29
votes
3 answers

Assignment of objects in VB6

I am attempting to create two identical objects in VB6 by assignment statements; something like this... Dim myobj1 As Class1 Dim myobj2 As Class1 Set myobj1 = New Class1 myobj1.myval = 1 Set myobj2 = myobj1 It has become apparent that this doesn't…
Brian Hooper
  • 21,544
  • 24
  • 88
  • 139
29
votes
3 answers

Bang Notation and Dot Notation in VBA and MS-Access

While perusing an application that I'm documenting, I've run across some examples of bang notation in accessing object properties/methods, etc. and in other places they use dot notation for what seems like the same purpose. Is there a difference or…
Nitrodist
  • 1,585
  • 5
  • 24
  • 34
29
votes
2 answers

What does putting an exclamation point (!) in front of an object reference variable do?

What does putting an exclamation point (!) in front of an object reference variable do in Visual Basic 6.0? For example, I see the following in code: !RelativePath.Value = mstrRelativePath What does the ! mean?
Ben McCormack
  • 32,086
  • 48
  • 148
  • 223
29
votes
7 answers

Object Library Not Registered When Adding Windows Common Controls 6.0

I am trying to install Visual Studio 6 on a Windows 7 32bit machine. The OS intall was from bare metal. I followed the instructions mentioned here (which I have used before) The install went fine with no errors reported but when I try to add the…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
28
votes
9 answers

Using Git with VB6

Our company has a large codebase in VB6, and we currently use VSS which, for all that we hate about it, at least integrates into the VB6 IDE. My own team, which is using .NET, are now looking into alternative SCMs like my personal favourite, Git.…
Gavin
  • 9,855
  • 7
  • 49
  • 61
27
votes
3 answers

How to use a mutex in Visual Basic

I have imported the kernel32 library. So, I have the createMutex function available but I am not quite sure of the various parameters and return values. This is classic Visual Basic, not Visual Basic.NET but I can probably work with either language…
Goyuix
  • 23,614
  • 14
  • 84
  • 128
27
votes
11 answers

Does the VB6 IDE run on Windows 7 / 8 / 10 64-bit?

We're approaching a point of replacing several of our developer PCs and would like to move up to 64-bit to maximize the hardware/life of the PCs but we also need to support several legacy VB6 applications. That said, Microsoft says it's not…
jasonk
  • 1,580
  • 4
  • 25
  • 33
27
votes
14 answers

Visual Studio 6 Windows Common Controls 6.0 (sp6) Windows 7, 64 bit

I was asked to help work on a legacy vb6 application for someone, so I decided to toss Visual Studio 6 on my Windows 7 x64 laptop following this guide. It installed fine, and from I can see everything is working except for Microsoft Windows Common…
Jay
  • 885
  • 1
  • 7
  • 9
26
votes
2 answers

No permission to access a private MSMQ

On an XP machine there is a private messagequeue that was created by a .net service. When I want to access this private queue in a VB6 application I keep getting an "Access is denied" error. So it seems this is a security issue, only I don't…
Mez
  • 2,817
  • 4
  • 27
  • 29
26
votes
3 answers

Variable number of arguments in VB

How to create a function with variable number of arguments in visual basic? ex. x = Sum(1,2,3) y = Sum(1,2) Function Sum('how to declare argument here') 'Is there any special argument manipulation inside function before it is usable? End…
Kratz
  • 766
  • 5
  • 10
  • 17