Global Boolean?

How can I create a global boolean that can be used anywhere (like a checkbox basically)
I created a boolean at FormOpen event: Dim blah as boolean = true
and then tried to make blah = false at Htmlviewer1 document complete event, however it’s giving me an error saying that blah does not exist.

Add a public property to the window and set it as a Boolean. Still tinkering with derivatives on my side… busy busy week.

Even more global is to create a module and put the property there. Then you have it across windows.

Any variables you create in an open even are local to that event only.

May I suggest you start reading the user guide. It will help you with a lot of this sort of stuff.

@Matthew Combatti Thanks Matt, are you still working on it?
@Jon Ogden I will try creating a module. I’ve started reading the user guide, it seems like I know what to do but every little thing is so different than c#, it’s not easy to switch languages.

[quote=89069:@James Defier]@Matthew Combatti Thanks Matt, are you still working on it?
@Jon Ogden I will try creating a module. I’ve started reading the user guide, it seems like I know what to do but every little thing is so different than c#, it’s not easy to switch languages.[/quote]

Completely different that C#. No question about that. But much easier and I dare say still as powerful…

I also think it’s easier, but I have a bad habit of writing ; at the end of every sentence :stuck_out_tongue: I keep making it harder for myself.

You just insert a module in the editor: via Insert Module and then add properties and other stuff to it. Best thing to name it “Global” or something like that for easier reference.

Or: Add public properties to your app and address them from everywhere as App.globallPropertyName = whatsoever