Click here to Skip to main content
15,913,939 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: executing command from VB.net application Pin
Steve Pullan29-Sep-05 14:11
Steve Pullan29-Sep-05 14:11 
GeneralRe: executing command from VB.net application Pin
Anonymous29-Sep-05 18:46
Anonymous29-Sep-05 18:46 
QuestionCrystal Report and Password Protected Access Database Pin
shoaibnawaz28-Sep-05 10:37
shoaibnawaz28-Sep-05 10:37 
AnswerRe: Crystal Report and Password Protected Access Database Pin
KaptinKrunch28-Sep-05 16:21
KaptinKrunch28-Sep-05 16:21 
QuestionWindow Forms Pin
SoonerFan28-Sep-05 10:31
SoonerFan28-Sep-05 10:31 
AnswerRe: Window Forms Pin
Dave Kreskowiak28-Sep-05 11:20
mveDave Kreskowiak28-Sep-05 11:20 
GeneralRe: Window Forms Pin
SoonerFan28-Sep-05 16:20
SoonerFan28-Sep-05 16:20 
GeneralRe: Window Forms Pin
Steve Pullan28-Sep-05 16:46
Steve Pullan28-Sep-05 16:46 
SoonerFan wrote:
I tried

Dim frmTable As New Form2
frmTable.Show()

What is the name of the form you are trying to instantiate? You need to change Form2 in the above code to whatever you have named it in your project (i.e. if it is called "TableForm" then the code becomes:
Dim frmTable As New TableForm
frmTable.Show()
The second form must be defined in the same project as the form from which you are trying to display it.

Simply creating an instance of an undefined Form object will cause the error you are seeing.

You could also try this code since it is a better idea to separate the Dim and the New operations for reasons we won't get into here:
Dim frmTable As TableForm
frmTable = New TableForm
frmTable.Show()

...Steve

-- modified at 22:47 Wednesday 28th September, 2005
GeneralRe: Window Forms Pin
Dave Kreskowiak28-Sep-05 17:11
mveDave Kreskowiak28-Sep-05 17:11 
GeneralRe: Window Forms Pin
Steve Pullan28-Sep-05 18:17
Steve Pullan28-Sep-05 18:17 
GeneralRe: Window Forms Pin
Dave Kreskowiak29-Sep-05 0:34
mveDave Kreskowiak29-Sep-05 0:34 
QuestionHelp ! Run-time error '2306' Pin
GJCVB28-Sep-05 8:32
GJCVB28-Sep-05 8:32 
AnswerRe: Help ! Run-time error '2306' Pin
Dave Kreskowiak28-Sep-05 8:53
mveDave Kreskowiak28-Sep-05 8:53 
QuestionVB vs. C# Pin
medicenpringles28-Sep-05 7:37
medicenpringles28-Sep-05 7:37 
AnswerRe: VB vs. C# Pin
Dave Kreskowiak28-Sep-05 8:44
mveDave Kreskowiak28-Sep-05 8:44 
AnswerRe: VB vs. C# Pin
Mike Hodnick28-Sep-05 10:14
Mike Hodnick28-Sep-05 10:14 
GeneralRe: VB vs. C# Pin
Dave Kreskowiak28-Sep-05 17:13
mveDave Kreskowiak28-Sep-05 17:13 
GeneralRe: VB vs. C# Pin
rwestgraham28-Sep-05 17:39
rwestgraham28-Sep-05 17:39 
QuestionOpen and close a PDF document Pin
necao28-Sep-05 6:01
necao28-Sep-05 6:01 
AnswerRe: Open and close a PDF document Pin
Dave Kreskowiak28-Sep-05 7:18
mveDave Kreskowiak28-Sep-05 7:18 
QuestionHow to monitor file time stamp for changes Pin
CamToo28-Sep-05 5:59
CamToo28-Sep-05 5:59 
AnswerRe: How to monitor file time stamp for changes Pin
Dave Kreskowiak28-Sep-05 7:00
mveDave Kreskowiak28-Sep-05 7:00 
QuestionMaintaining an inherited VB6 application Pin
StrayGrey28-Sep-05 5:50
StrayGrey28-Sep-05 5:50 
AnswerRe: Maintaining an inherited VB6 application Pin
Dave Kreskowiak28-Sep-05 6:34
mveDave Kreskowiak28-Sep-05 6:34 
GeneralRe: Maintaining an inherited VB6 application Pin
StrayGrey28-Sep-05 6:57
StrayGrey28-Sep-05 6:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.