(05-19-2010, 05:46 PM)kandrathe Wrote:(05-19-2010, 02:58 AM)MEAT Wrote: EDIT: Whee look at me, I'm an idiot... I forgot to Dim my values as Range and I was wondering why they wouldn't work when I tried to set them. Never-mind; nothing to see here.I often learn the most trying to explain things to others.
I'm getting so frustrated because my program has 7 outputs based on a random selection of cells containing my data - I wrote a function they all use to make this determination - and 6 of the outputs work without any issues, however one of the outputs says #VALUE! about 20% of the time and I am 100% sure it has the correct cells to look-up a random value for! I'm also sure its outputting all of the random cells correctly. And I'm also sure I set the Cell properties appropriately so half aren't classified as numerical and the others as text. So... I'm trying to figure out how to make VB display the current Cell of my Dim TRAP, but all it will give me is TRAP's value, not it's cell location. And I can't find any information on how to get a values cell location anywhere. I feel like I'm working backwards... once I figure out how to extract the values cell location, then I can see where TRAP is pointing too when giving me the #VALUE! error, and then I can correct it, assuming it is an error with a cell and not the program itself. But it can't be the program because all the outputs use the same function without issue. Fun stuff. I suppose I could just use the program as is and "re-roll" the results when they come up with error, but that just looks sloppy.
Lets see, I tried "MsgBox mc.Addressof("TRAP")", "Application.Goto Reference:=Worksheets("Sheet1").Range("TRAP")", but those don't work. They want an actual cell reference, but so do I, lol!
"The true value of a human being is determined primarily by the measure and the sense in which he has attained liberation from the self." -Albert Einsetin