As I understand it, you have two .NET ComboBoxes on a UserControl that implements ICommand and IToolControl, and you want to get a reference to one of the combo boxes from the other. As long as they are in the same scope you should just be able to refer to them by their variable names (check your UserControl designer for the names of your controls).
If the two combo boxes are on separate UserControls, then try casting ICommandItem.Command
to your other UserControl.
See this sample in the 9.3 help for some examples: Recently used files - Command, MultiItem, and ToolControl
Also here is an ESRI forum post discussing this issue: http://forums.esri.com/Thread.asp?c=93&f=993&t=170088
I did call ESRI support about this and their answer wasn't encouraging, but it did explain the problem. Paraphrasing ESRI: The problem is that ArcGIS Desktop, being 32-bit software, is limited to using 4GB of RAM at the most. The text file has to be processed in RAM before being stored as a table, so at some poing during processing ArcGIS was hitting the RAM limit and just stopping there. The file I was importing was around 6GB in size. Apparently the fact that it failed without giving an error message is unique to me, I tried having other people in my office do it and the import still failed, but it gave an error message (an unhelpful one, but at least something that let the user know something went wrong), and the ESRI rep said that it should give an error.
My solution was to split the file into two smaller CSVs using a text editor (I used EditPad Pro), import each of them into an FGDB as a separate table, then merge the two FGDB tables. For some reason this failed the first time I tried it but worked later on. I may get around to testing this a little more fully, I'm going to be dealing with files this size on an ongoing basis.
I'm using ArcGIS 10.0, but ArcGIS 10.1 service pack 1 was just released and adds the ability to use a 64-bit background geoprocessor, which will let the geoprocessor use more than 4GB RAM, that may fix this problem but I can't test that.
UPDATE: I am now using ArcGIS 10.1 SP1 (with the 64-bit background geoprocessing addon) and it does successfully import these giant .CSVs, at least the ones I've dealt with so far. On a machine with 14GB of RAM (yes, 14), a 6GB .CSV with about 10.5 million rows successfully imports to an FGDB table.
Best Answer
Based on pecoanddeco's answer, here is the VBA code converted to C#.
Note that you'll need to create the
XYSample.txt
file and add it to your map as described hereNeed to add the following ArcGIS References