visual+basic+excel - declaring variables

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » visual+basic+excel - Declaring variables

visual+basic+excel - Declaring variables

resolvedResolved · Low Priority · Version Standard

James has attended:
Excel VBA Intro Intermediate course

Declaring variables

I've declared a byte variable as public at the start of a form.

A process in this form opens another form which gives an integer value (1 or 0) to the variable, and then the main form should take the variable value forward.

The only way I found to avoid an undefined compile error was to define the variable at the start of both forms (both as public), but the variable value isn't read across from one form to the next.

Thanks

RE: Declaring variables

Found a way round it was to define the Variable as Public in a Module instead of at the start of the forms... this seems to solve the problem

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Move to edge of data block

When data is held in a block, however large, use the Ctrl key with your cursors to move quickly to the far edge of the block. Works with all 4 direction keys.

View all Excel hints and tips


Server loaded in 0.05 secs.