+ Reply to Thread
Results 1 to 2 of 2

Accessing public variable from form

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2010 (Excel, Word, Access)
    Posts
    72

    Accessing public variable from form

    This is probably dirt simple, but I'm stumped all the same.

    I have two forms in the spreadsheet that I'm developing. One is an interface form used on startup so that users only have to look at the data they need. The other is used for data entry to the spreadsheet, with a Multipage that inputs header data from the first tab, and batch data from the second.

    I'm trying to set it up so that the page that comes up on the second form changes based on how it's accessed. In order to do that, I've declared public variable intHeadBat in the interface form that is supposed to hold on to the page number it should access in the data entry form, like so.

    Interface form:
    Please Login or Register  to view this content.
    Data Entry form:
    Please Login or Register  to view this content.
    For whatever reason, when it opens up the second form to start initializing everything, it doesn't seem to know that intHeadBat has a value in it. What am I missing here? Shouldn't it be accessible as a public variable based on the initial declaration?

  2. #2
    Registered User
    Join Date
    11-29-2012
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2010 (Excel, Word, Access)
    Posts
    72

    Re: Accessing public variable from form

    Never mind. I was right, it was dirt simple. I'd delete the thread if I knew how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Public Variable value
    By nfpaccounting in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2011, 02:34 PM
  2. Public Variable
    By Digitborn.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2007, 03:54 PM
  3. Public variable
    By Jack in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-18-2006, 05:40 PM
  4. [SOLVED] declaring public variable value
    By Damon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2005, 10:05 AM
  5. Replies: 1
    Last Post: 01-05-2005, 06:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1