ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multipage and Global variables (https://www.excelbanter.com/excel-programming/428043-multipage-global-variables.html)

Bill

Multipage and Global variables
 
Have a multipage form

Up front have delared
Option Explicit
Public mya1, mya2

Then
Sub workbook_open()
Worksheets("Answers").Activate
mya1 = Range("e2").Value 'mya1 at this stage is holding value
Mymain.Show 'mymain is multipage form

In mymain first page have group buttons
When select button want mya1 to display
But mya1 is blank

Any clues appreciated


Jacob Skaria

Multipage and Global variables
 
From VBE, left tree view. Right click on 'This workbook'. Insert a module and
move your declarations to the there...Save and try..

If this post helps click Yes
---------------
Jacob Skaria


"Bill" wrote:

Have a multipage form

Up front have delared
Option Explicit
Public mya1, mya2

Then
Sub workbook_open()
Worksheets("Answers").Activate
mya1 = Range("e2").Value 'mya1 at this stage is holding value
Mymain.Show 'mymain is multipage form

In mymain first page have group buttons
When select button want mya1 to display
But mya1 is blank

Any clues appreciated



All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com