As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Excel VBA Help

minirhyderminirhyder BerlinRegistered User regular
So I need some concise explanation about how the different scopes in VBA work.

Like you can have your code in a module, a sheet, a workbook, and I'm not entirely sure how these three things relate to another.

The issue I'm having is that I have some buttons, and each one does a thing. These buttons are ActiveX, so their pieces of code lies in the sheets on which they are...I'm not sure if there's a way to change this? If I right click 'view code' it just sends me to the sheet code window.
One of the buttons needs to check if a button within another sheet has been pressed. I created a Boolean variable that checks this, however, since the two buttons and their respective pieces of code are in different sheets, it seems that the variable doesn't translate between the two? Button A sets the variable to True, but Button B's code sees it as False (I'm guessing because it's in another sheet).

Help?

Sign In or Register to comment.