EXCEL VBA : How to validate value with isString or isNumeric? -
Here my code is given:
String like slow m, n long time Until n = InputBox ("Enter the amount of sale:") If & n; 500 or not & gt; 5000 Then ActiveCell.Value = n ActiveCell.Interior.Color = RGB (255, 0, 0) M = InputBox ("cause why increase / decreased?") ActiveCell.Offset (0, 1) .Value = I ActiveCell.Offset 1, 0). Choose Else Active Seal. Value = enactivel.offetts (1, 0). If finished, choose
I was finding out how the input is valid when the input string is indicative of the integer and will ask? Thanks in advance for the reply.
code:
as a dim m string, string In the form, tryAgain as long as sale: n = InputBox ("Enter the sales amount:") If not, numeric (N) then "MSBBC" entry should be a number! " GoTo TryAgain End if the sale = CLNG (N) if sale & lt; 500 or Sale & gt; 5000 Then ActiveCell.Value = Sales ActiveCell.Interior.Color = RGB (255, 0, 0) M = Input box ("cause why increase / decreased?") ActiveCell.Offset (0, 1) .Value = I ActiveCell Offset 1, 0). Select More Active ActiveCell.Value = Sales ActiveCell.Offset (1, 0). Select end if
Comments
Post a Comment