Results 1 to 5 of 5

Global variable - Get a textbox value - Userform

Threaded View

  1. #1
    Registered User
    Join Date
    06-09-2015
    Location
    Brazil HU3HU3
    MS-Off Ver
    2007
    Posts
    5

    Question Global variable - Get a textbox value - Userform

    Well, i would like to store a textbox value (dateformat) in a global variable and then use her value to find a specific data in my DB


    so i wrote it:

    IN MODULE 1:

    'Set a global variable

    Public glbdate As Date


    'Create a function
    Public Function globaldate()

    glbdate = Format(dt_lan, "mm/dd/yyyy")

    End Function


    IN A TEXTBOX FIELD(Event afterupdate field):

    Call globaldate 'call function to get the date


    IN A COMMAND BUTTON:

    cnctnate = glbdate & manline & model 'Im trying to get the value

    IDK what's going on, but it's not working. HELP PLS!
    Thanks,
    Last edited by SamGeron; 06-12-2015 at 08:07 AM. Reason: TAGS

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Refer to textbox on another UserForm via variable
    By soberguy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-02-2015, 03:58 PM
  2. VBA, Userform, Textbox: Refer to TextBox Name as a Variable
    By Brianandstewie in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 07-09-2013, 05:49 PM
  3. Subtract variable from UserForm TextBox
    By Nu2Java in forum Excel General
    Replies: 6
    Last Post: 10-10-2012, 10:11 PM
  4. [SOLVED] Global variable declared in Userform. Variable value is not sticking
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-25-2012, 08:50 AM
  5. Setting Global Variable from a UserForm
    By agwright in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2009, 09:59 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