G Guest Apr 17, 2006 #1 I'd like to writer a macro to execute certain activities dependent on the value of a cell. Thx. cg
G Guest Apr 17, 2006 #2 Your question is about a whole programming topic. To begin, you may go to Visual Basic Editor, call the Help, and type "IF statement" in the search box. Then choose "Using If...Then...Else Statements". The on-line help is a very useful source of technical information. Regards, Edwin Tam (e-mail address removed) http://www.vonixx.com
Your question is about a whole programming topic. To begin, you may go to Visual Basic Editor, call the Help, and type "IF statement" in the search box. Then choose "Using If...Then...Else Statements". The on-line help is a very useful source of technical information. Regards, Edwin Tam (e-mail address removed) http://www.vonixx.com
C cucchiaino Apr 17, 2006 #3 hccatmo said: I'd like to writer a macro to execute certain activities dependent on the value of a cell. Click to expand... x=Range("A1").value ------------------- Select case x Case 1 to 3 ... Case ... end select
hccatmo said: I'd like to writer a macro to execute certain activities dependent on the value of a cell. Click to expand... x=Range("A1").value ------------------- Select case x Case 1 to 3 ... Case ... end select
G Guest Apr 17, 2006 #4 Thx. Great help. cg cucchiaino said: x=Range("A1").value ------------------- Select case x Case 1 to 3 ... Case ... end select ------------------- On x gosub routine1, routine2, ... ---------------------------------- y = Application.Run("file.xls!Macro", x) ---------------------------------------- ()---cucchiaino Click to expand...
Thx. Great help. cg cucchiaino said: x=Range("A1").value ------------------- Select case x Case 1 to 3 ... Case ... end select ------------------- On x gosub routine1, routine2, ... ---------------------------------- y = Application.Run("file.xls!Macro", x) ---------------------------------------- ()---cucchiaino Click to expand...