G
GRIFFO
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
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