Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Iam a Leaner of excel macro by using the examples in this
News group because of that i get some simple but serious doubts some times I have some more doubts in macro CAN YOU HELP ME please!! 1) Is it possibe to activate an Userform or List Box by hitting one Key, (in Foxpro it is ONKEY Label...") 2) while giving conditions we use " if a = "xxx" then ....." etc ..... but how to say "if a (isnot equal) "xxx" ......" ( other than "else" ..... Condition) 3) while giving conditions we use "if ... then ... endif ..."statements is it possible for using one more "if .. then.. endif" statement in between that statement , if yes how many "endif" we have to use at the end PLEASE GIVE ME SOME EXAMPLES ALSO Tks & regards |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Manu,
1) Is it possibe to activate an Userform or List Box by hitting one Key, (in Foxpro it is ONKEY Label...") If your sub that shows the form is called "SubThatShowsTheForm", then this codeline will attach that sub to control-shift-s: Application.Onkey "^+s", "SubThatShowsTheForm" 2) while giving conditions we use " if a = "xxx" then ....." etc ..... but how to say "if a (isnot equal) "xxx" ......" ( other than "else" ..... Condition) If a < "xxx" Then 3) while giving conditions we use "if ... then ... endif ..."statements is it possible for using one more "if .. then.. endif" statement in between that statement , if yes how many "endif" we have to use at the end You can nest them: If A=1 Then If a=2 Then Msgbox "A= 2" Else Msgbox "A is 1" End If Else Msgbox "A is neither 1 nor 2" End If Or: If A=1 Then Msgbox "A is 1" ElseIf a=2 Then Msgbox "A= 2" Else Msgbox "A is neither 1 nor 2" End If Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel doubts | Excel Discussion (Misc queries) | |||
Microsoft Excel doubts | Excel Discussion (Misc queries) | |||
Addin for Excel - general doubts | Excel Programming | |||
Excel Macro Basic Help | Excel Programming | |||
visual basic macro in excel | Excel Programming |