Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Cory Nelson   on Feb 24 In MS Office Category.

  
Question Answered By: Freda Lane   on Feb 24

I've never even thought about it. A function  returns a value. I have
used the results of a function as an argument  to another function
though.

Psuedo Code:

Sub test() 'Start Here with Pressing F8
GetString ("Hello-World")
End Sub

Public Function GetString(strString As String) As String
StripChars2 (strString)
End Function

Public Function StripChars2(strText As String) As String
strTestString = strText
strStripChars = " ()-"
For i = 1 To Len(strStripChars)
strBadChar = Mid(strStripChars, i, 1)
strTestString = Replace(strTestString, strBadChar, vbNullString)
Next
Debug.Print strTestString

End Function

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on function as argument Or get search suggestion and latest updates.


Tagged: