Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
CurrentRegion won't work in a UDF called from an Excel cell. From what I
remember reading a while ago on the newsgroups, CurrentRegion is a type of selection, which is disallowed. Actions that manipulate the environment cannot be performed this way even though it works as a straight VBA macro. You'll have to set the range reference a different way. -- Tim Zych SF, CA "kelly" wrote in message oups.com... Hi, dear all i write a funciton in vba and want to use it in excel sheet. the script is like, ************************************************** ************************************** Function sample(sheetname As Integer) As Integer Dim R As Excel.Range Dim c As Variant sample = 0 For Each c In Worksheets(sheetname).Range("A1").CurrentRegion If Right(c.Value, 1) = "*" Then sample = 1 Exit Function End If Next End Function ************************************************** ************************************** When i type the formular in excel sheet, it can not work. the excel version is 2000. can anybody help me with this? Thank you Kelly |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can i allow my excel webpage to be edited and not read only | Excel Discussion (Misc queries) | |||
How too set last edited date in excel and which user was it? | Excel Worksheet Functions | |||
how to send excel attachments which can be edited and sent back | Excel Discussion (Misc queries) | |||
Excel 2003: can I insert a "last edited" date function? | Excel Worksheet Functions | |||
Excel not detecting that a file is currently being edited | Excel Discussion (Misc queries) |