🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual
Article #211

Re: VB6 Bug?

#211
From: Jan Hyde
Date: Wed, 23 Jul 2003 12:25
49 lines
2311 bytes
"sjoerd" <iwi@iwi.myweb.nl>'s wild thoughts were released on
Wed, 23 Jul 2003 12:35:00 +0200 bearing the following fruit:

>Hi,
>
>I have a problem in a MDI-project.
>I declared a variable MyVarAA in frmMain.frm (Public MyVarAA) in the General
>Declaration section)
>
>I need this variable in Form1, so in the Form_Load of this form I wrote:
>
>MyVarBB = frmMain.MyVarAA
>
>When trying to run the program I get the following error:
>
>Run-time error 426 (only one MDI-form allowed).
>
>The debug-information tells me:
>
>frmMain.MyVarAA = <object variable or with block variable not set>
>
>Acoording to the book I use (Using Visual Basic 6) is this the way to do it.
>Error in the Book? Bug in VB? Something else?
>
>Thanks,
>
>Sjoerd
>


Dim frm as frmMDIMain

'-- Load an instance of the MDI form
set frm = New FrmMDIMain
frm.Show
'-- Causes another instance of the MDI to load
frmMDIMain.Caption = "Ooops"
'-- Does not cause another instance to load
frm.Caption = "Correct'

J


-- 
So I said "Do you want a game of Darts?", he said "OK then", I said
"Nearest to bull starts". He said "Baa", I said "Moo", he said
"You're closest". 

[Abolish the TV Licence - http://www.tvlicensing.biz/]
Technical Details
Message-ID: <ohvshvk1jgtihtm0u278gjtpskd7e2k0me@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
References: <bfloct$kk1$1@news1.tilbu1.nb.home.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f645d,88f30e77b5d7071c
X-Google-Attributes: gidf645d,public
X-Google-Thread: 110e3b,88f30e77b5d7071c
X-Google-Attributes: gid110e3b,public
X-Google-Thread: f51ba,88f30e77b5d7071c
X-Google-Attributes: gidf51ba,public
X-Google-ArrivalTime: 2003-07-23 05:23:56 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: Jan Hyde <StellaDrinker@REMOVE.ME.uboot.com>
Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.misc,dk.edb.programmering.basic.visual-basic
Subject: Re: VB6 Bug?
Date: Wed, 23 Jul 2003 13:25:00 +0100
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <ohvshvk1jgtihtm0u278gjtpskd7e2k0me@4ax.com>
References: <bfloct$kk1$1@news1.tilbu1.nb.home.nl>
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@supernews.com
Lines: 50