LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Why null reference to ListBox?

My UserForm has a ListBox control named lbox. In the click handler of
another control on the same form I call a subroutine that has lbox as one of
its parameters. I get a "Run-time error '13': Type mismatch" and when I go
to debug mode and float the cursor over "lbox" in the VBA code I see "lbox =
Null." However when I examine lbox in the "Locals" debug window it is well
defined. What don't I understand? How can break mode debugging give
different values for the same reference in different windows? Why did the
error occur?

HM


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to save table attributes of (null) into (null). Luca Brasi Excel Discussion (Misc queries) 2 February 4th 09 04:30 PM
How to reference a null value? ie: =Lookup("", B2:B4, A2:A4) KWilde Excel Discussion (Misc queries) 6 February 28th 08 09:36 PM
'null reference' when trying to use WorksheetFunction from C# RandomEngineer Excel Worksheet Functions 0 April 25th 06 04:21 AM
workbook and application reference set to null after the user enters something in an excel sheet Tobias[_3_] Excel Programming 0 May 19th 04 04:55 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"