Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Immediate window gives different results to a UDF
Hello all,
Ok, now ive pulled all my hair out and called Microsoft every name under the sun, i thought it about time I consulted some pros. This works perfectly well in the immediate window (with debug.print), however when used as an excel sheet function I just get the #VALUE! error. debug.print Sheets("MVP DB Model").Range("A:A").SpecialCells(xlCellTypeVisibl e).Areas(2).Cells(1).Row Private Function firstrow() As Variant firstrow = Sheets("MVP DB Model").Range("A:A").SpecialCells(xlCellTypeVisibl e).Areas(2).Cells(1).Row End Function Please help me by tell me it is something rediculasly simple that am overlooking or is it a daft excel quirk? Ive a similer problem with returning the address for the auto filter range. With the immediate window this gives me a text string that would be able to split() however used in a function it gives me 1 range value. Sheets("MVP DB Model").AutoFilter.Range.Offset(1, 0).SpecialCells(xlCellTypeVisible).Address Any help or pointers are most graciously appreciated. Regards, David |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to save a desired window size but hv window comeup fullsz by d | Excel Discussion (Misc queries) | |||
Missing Help Search Results Window | Excel Discussion (Misc queries) | |||
Docking Project Explorer, Properties window and Code window in VBE | Setting up and Configuration of Excel | |||
The window opens in a smaller window not full sized window. | Excel Discussion (Misc queries) | |||
Resizing search results window | New Users to Excel |