Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is string
I have a macro that gets data from another program. I want to check that data
and "clean" it ie remove unneccessay blanks etc. The data is stored in the variable BBAnswer. I then check that variable: If IsRatingOK(BBAnswer) Then ........ Function IsRatingOK(BBAnswer As Variant) As Boolean IsRatingOK = False Rating = CleanRating(BBAnswer) ............................. End Function Function CleanRating(BBAnswer As Variant) As String c_pos = InStr(1, BBAnswer, " ", 1) ................ on the last row I get an error if BBAnswer is not a string ie it has some other format. Please help me how to solve this problem. Is there anything like IsDate() or is there any other way of solving this? Please help! Any help appreciated! Thanks alot in advance! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is string
I cannot reproduce the problem. What is in BBAnswer that causes your
problem? -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Arne Hegefors" wrote in message ... I have a macro that gets data from another program. I want to check that data and "clean" it ie remove unneccessay blanks etc. The data is stored in the variable BBAnswer. I then check that variable: If IsRatingOK(BBAnswer) Then ....... Function IsRatingOK(BBAnswer As Variant) As Boolean IsRatingOK = False Rating = CleanRating(BBAnswer) ............................. End Function Function CleanRating(BBAnswer As Variant) As String c_pos = InStr(1, BBAnswer, " ", 1) ............... on the last row I get an error if BBAnswer is not a string ie it has some other format. Please help me how to solve this problem. Is there anything like IsDate() or is there any other way of solving this? Please help! Any help appreciated! Thanks alot in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change 3 letter text string to a number string | Excel Discussion (Misc queries) | |||
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) | Excel Programming | |||
Importing Long String - String Manipulation (EDI EANCOM 96a) | Excel Programming | |||
to search for a string and affect data if it finds the string? | Excel Worksheet Functions | |||
Create a formula into a String then assign string to a cell | Excel Programming |