Thread: What is True ??
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
moon[_6_] moon[_6_] is offline
external usenet poster
 
Posts: 43
Default What is True ??


Because you cannot assign a value to multiple variables in a oneliner like
in C++.
You already gave t a value of 1.
Why do you do that again in t2 = (t=1) * 7


This one gives 7.

Sub macro()
Dim t As Integer
Dim t2 As Integer
t = 1
t2 = t * 7
MsgBox (t2)
End Sub



"Jakobshavn Isbrae" schreef in
bericht ...
I run this
Sub macro()
Dim t As Integer
Dim t2 As Integer
t = 1
t2 = (t = 1) * 7
MsgBox (t2)
End Sub

and it says -7, not 7

Why?

--
jake