Newsgroups: microsoft.public.vb.bugs
From: "Tony Proctor" <tony_proctor@aimtechnology_NOSPAM.com>
Date: Fri, 16 May 2003 11:03:40 +0100
Local: Fri, May 16 2003 11:03 am
Subject: Bug in 'With...End With'
I've been trying to track down a problem in my code, and it looks like a VB
bug in the 'With' block. I was wondering if anyone had seen anything like this before. Basically, assignments inside a particular 'With' block do absolutely nothing: no values modified anywhere and certainly no error messages. More details comments are in my sample code below. For reasons too involved to explain, my UDT array (vDetails) is referenced If anyone feels like trying to compile this dummy example, the Types have to Tony Private tDetails() As Details Sub Main() ' This doesn't actually modify vDetails(1).tMsgStore(1).bNew, and it MsgBox vDetails(iEntry).tMsgStore(iMsg).bNew 'Reports 'False' ' This correctly modifies vDetails(1).tMsgStore(1).bNew MsgBox vDetails(iEntry).tMsgStore(iMsg).bNew 'Reports 'True' now ' This now goes back to the original construct, but in "read mode" where the Types might be defined in a *public* class as follows: Public Type MsgDetails Public Type Details You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||