Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I m having a problem in writing a macro here.I have two variables name My Budget and Total Sale.In Mybudget i have assign it a value 8000.and in totalSale the value is 69950(sum of some expression).then i use a two msg box to show each value .it is showing the right value.then i use a conditon that if the value of total sale which is 69950 is less than 8000 then show a msg box which says my sales are less else msg box show that my Sales are greater.The right answere is that it has to show my sales are greater but it is showing My sales are lesss.i dont know y ....here is my Script
Sub
ShowPoPUp
set
if
MsgBox
MsgBox
("MySales are greater than 8000")end
ifend
Sub ("MySales are less than 8000")else
(v.getcontent. string) < (a.getcontent. string) then a=ActiveDocument.Variables("MyBudget")set
v=ActiveDocument.Variables("TotalSale")Msgbox
(a.getcontent. string)Msgbox
(v.getcontent. string)Regards
Sikandar
Hi sikandar,
try & paste your macro once again. First paste it in notepad & then paste it in the Post , direct copy paste doesn't paste the content properly. From the little bit I could understand , try & use CINT(stringvalue) instead of using the string value of the expression. It will not give the required input.
e.g. Msgbox CINT("1000")<CINT("2000")
See if it help.
Regards
Amar
Hi sikandar,
try & paste your macro once again. First paste it in notepad & then paste it in the Post , direct copy paste doesn't paste the content properly. From the little bit I could understand , try & use CINT(stringvalue) instead of using the string value of the expression. It will not give the required input.
e.g. Msgbox CINT("1000")<CINT("2000")
See if it help.
Regards
Amar
Hi amras
Armas the solution you gave worked,Thank you sooo much
Regrds
Sikandar