Public Function IsNumber(ByVal Value As String) As Boolean
Dim DP As String
' Get local setting for decimal point
DP = Format$(0, ".")
' Leave the next statement out if you don't
' want to provide for plus/minus signs
If Value Like "[+-]*" Then Value = Mid$(Value, 2)
IsNumber = Not Value Like "*[!0-9" & DP & "]*" And Not Value Like "*" & DP & "*" & DP & "*" And Len(Value) > 0 And Value <> DP
End Function
Do I need to incorporate your changes into the code to adapt to different locations?I believe so, yes, but you can test as if you are in a different country by going to Control Panel|Regional and Language Options and then choose a different country.
Range(strRangeName).Value = IIf(IsNumeric(Mid(strTemp, 1, InStr(1, strTemp, "<", vbTextCompare) - 1)) = True, Mid(strTemp, 1, InStr(1, strTemp, "<", vbTextCompare) - 1), 1)
If IsNumeric(Mid(strTemp, 1, InStr(1, strTemp, "<", vbTextCompare) - 1)) = True Then
Range(strRangeName).Value = Mid(strTemp, 1, InStr(1, strTemp, "<", vbTextCompare) - 1)
Else
Range(strRangeName).Value = 1
End If
Function IsConnected() As Boolean
Dim Stat As Long
IsConnected = (InternetGetConnectedState(Stat, 0&) <> 0)
End Function
Title | # Comments | Views | Activity |
---|---|---|---|
i need to create an excel drop down list that that is limited | 7 | 26 | |
Problem to open Excel file | 15 | 35 | |
How to compare data in excel | 5 | 24 | |
Add macros on Open | 4 | 0 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
8 Experts available now in Live!