Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How to use a UDF (module) across many users (embedd in worsheet)

Hi, I am using a UDF to strip non numeric text out of a cell.

That is:

Function StripTxt(a As String) As String
' Strips all non-numeric characters from a string
' Returns a string, not a number!
Dim i As Long
Dim b As String
For i = 1 To Len(a)
b = Mid$(a, i, 1)
If Asc(b) 47 And Asc(b) < 58 Then StripTxt = StripTxt + b
Next i
End Function

My questions is, when someone other than me opens this workbook, it
references their local C Drive profile for the location of the xla file. Is
there a way such that I can embedd this UDF in the workbook itself, such that
it doesn't have to reference an external file?

That is, I want the code related to stripping the text, to remain in the
workbook, so that another user other than the one that created the function
can use it.

Any assistance would be appreciated.

John

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How to use a UDF (module) across many users (embedd in worsheet)

It's all good. For some reason the module was saved to a temporary file of
some sort. re did the process and now all is good.
:)

--
Your assistance is appreciated.
Griffo



"GRIFFO" wrote:

Hi, I am using a UDF to strip non numeric text out of a cell.

That is:

Function StripTxt(a As String) As String
' Strips all non-numeric characters from a string
' Returns a string, not a number!
Dim i As Long
Dim b As String
For i = 1 To Len(a)
b = Mid$(a, i, 1)
If Asc(b) 47 And Asc(b) < 58 Then StripTxt = StripTxt + b
Next i
End Function

My questions is, when someone other than me opens this workbook, it
references their local C Drive profile for the location of the xla file. Is
there a way such that I can embedd this UDF in the workbook itself, such that
it doesn't have to reference an external file?

That is, I want the code related to stripping the text, to remain in the
workbook, so that another user other than the one that created the function
can use it.

Any assistance would be appreciated.

John

Reply
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
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
worsheet evelyne Excel Discussion (Misc queries) 2 April 13th 07 11:29 PM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
prevent users from overwriting other users data [email protected] Excel Worksheet Functions 0 April 17th 05 08:18 PM
Help - Automating a file.. Adding Users , Deleting users, Changing Tim Harding Excel Worksheet Functions 0 March 16th 05 01:25 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"