J jschuchert Active Member Licensed User Longtime User Apr 30, 2011 #1 I created a global variable (intaz) in the process globals sub of the main module. I then dimmed a checkbox (chkazimuth) under global subs. I placed the checkbox on the main layout and used the following for a btnOK event within that layout. I also tried it within 'create activity....' Code: sub btnOK_click 'other code . . If chkazimuth.checked = true then intaz = 1 end sub In another module the code is: Code: If main.intaz>0 then do something Problem is that main.intaz doesn't know it is supposed to be 1. Since it is a global variable, I just assumed its value would be recognized in all modules. It works fine if the checkbox is within the activity being accessed. Since I want to use this approach as a way to set preferences, I need to know the correct procedure. Please straighten me out. Thanks all. Jim Schuchert
I created a global variable (intaz) in the process globals sub of the main module. I then dimmed a checkbox (chkazimuth) under global subs. I placed the checkbox on the main layout and used the following for a btnOK event within that layout. I also tried it within 'create activity....' Code: sub btnOK_click 'other code . . If chkazimuth.checked = true then intaz = 1 end sub In another module the code is: Code: If main.intaz>0 then do something Problem is that main.intaz doesn't know it is supposed to be 1. Since it is a global variable, I just assumed its value would be recognized in all modules. It works fine if the checkbox is within the activity being accessed. Since I want to use this approach as a way to set preferences, I need to know the correct procedure. Please straighten me out. Thanks all. Jim Schuchert
agraham Expert Licensed User Longtime User Apr 30, 2011 #2 That looks like it should work, maybe the problem is elsewhere. Upvote 0
J jschuchert Active Member Licensed User Longtime User Apr 30, 2011 #3 I believe I found the problem. I had the same layout for 2 activities and must have coded the wrong one. That is all I can think of. It works now. Thanks for looking. Jim Schuchert Upvote 0
I believe I found the problem. I had the same layout for 2 activities and must have coded the wrong one. That is all I can think of. It works now. Thanks for looking. Jim Schuchert