Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
changing math operations for math operations with = sign
I have this code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Dim arr() As Variant On Error GoTo eh Application.EnableEvents = False For cnt1 = 1 To target.value.words.count arr(cnt1) = Target.Value.words(cnt1) If IsNumeric(arr(cnt1)) Or arr(cnt1) < "+" Or arr(cnt1) < "-" Or arr(cnt1) < "*" Or arr(cnt1) < "/" Or arr(cnt1) < "^" Or arr(cnt1) < "." Then GoTo eh End If wrdd = wrdd + arr(cnt1) Next Target.Value = "=" & wrdd eh: Application.EnableEvents = True End Sub what I want to do is if the user types 3+5 then excell will change 3+5 to =3+5 and will solve the operation; the problem us that target.value.words.count and Target.Value.words(cnt1) dont exist in excel, any suggestion thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
bitwise operations as in xor | Excel Discussion (Misc queries) | |||
IF Calculation and Operations | Excel Discussion (Misc queries) | |||
OWC operations in Excel | Excel Discussion (Misc queries) | |||
Repeating VBA operations | Excel Discussion (Misc queries) | |||
VBA for matrix operations | Excel Programming |