LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default How to use function edited in VBA in excel sheet

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
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
How can i allow my excel webpage to be edited and not read only netdesignz Excel Discussion (Misc queries) 0 December 19th 06 05:59 PM
How too set last edited date in excel and which user was it? jinlarse Excel Worksheet Functions 5 March 23rd 06 02:26 PM
how to send excel attachments which can be edited and sent back excel attachments Excel Discussion (Misc queries) 0 September 30th 05 03:38 PM
Excel 2003: can I insert a "last edited" date function? KTK Excel Worksheet Functions 1 June 27th 05 11:59 PM
Excel not detecting that a file is currently being edited cds_tech Excel Discussion (Misc queries) 1 June 27th 05 09:06 PM


All times are GMT +1. The time now is 02:15 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"