How to use a UDF (module) across many users (embedd in worsheet)

G

Guest

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
 
G

Guest

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.
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top