+ Reply to Thread
Results 1 to 5 of 5

How to Declare a global public variable on Macro Button

  1. #1
    Registered User
    Join Date
    08-05-2007
    Posts
    11

    How to Declare a global public variable on Macro Button

    Hello,

    Im not sure how to decalre a global public variable on a macro button I have! I need to declare it and set it to true! Anyone tell me how. This is the code im using.
    Please Login or Register  to view this content.
    ----
    Please Login or Register  to view this content.
    Last edited by VBA Noob; 08-06-2007 at 06:01 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why not

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-05-2007
    Posts
    11
    Thanks RoyUK. Unfortuantly thats not going to work for what i am attempting to do.

    I have a button (that has that macro code above assigned)
    What i would like to do is disable save and save as and message saying "Please Use the Button".

    From the site I recieved the disable code, it said to set fOK as a global public variable and to set fOK in the button Module as True...Have no clue how to do that!!

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I think this is what you want

    Please Login or Register  to view this content.

    Then your code will work

  5. #5
    Registered User
    Join Date
    08-05-2007
    Posts
    11
    Roy UK you are Awesome!!

    A great many thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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