+ Reply to Thread
Results 1 to 4 of 4

Form load with a variable

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    Netherlands
    MS-Off Ver
    Office 365 (2013)
    Posts
    268

    Form load with a variable

    Hey,

    I don't know if this is possible. But I want to make multiple buttons on sheet1.
    If you press one of these buttons it should open a form.
    -- That part was easy --

    Now I want to load the column value that is put in the button macros to this form.
    so if button 1 has Column = 3 in it, then the form should take over this value to be used in the output when pressing a button in that form.

    Form looks like this:
    --- type here ---
    ______________
    |_____________|
    [cancel] [ok]
    ----------------

    So the form needs to know what button is pressed. Either by receiving a value (as an integer) or by "knowing what button activated him".

    Thanks in advance

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Form load with a variable

    It is not very clear to me what you want but maybe:
    Userform:
    Please Login or Register  to view this content.
    Sheet button code:
    Please Login or Register  to view this content.
    You may also use property procedure instead of public member.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    7,268

    Re: Form load with a variable


    Hi,

    see VBA help of Application.Caller

    Regards !

  4. #4
    Forum Contributor
    Join Date
    09-02-2013
    Location
    Netherlands
    MS-Off Ver
    Office 365 (2013)
    Posts
    268

    Re: Form load with a variable

    It's always difficult to express yourself in words about something you don't know much about.
    Yet I seem to have made myself clear enough somehow, even though there was doubt

    Works like I wanted Izandol! Thanks!

+ 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. macro to load form
    By tango in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2009, 12:48 AM
  2. Form Load Picture form variable
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-21-2009, 12:02 PM
  3. User Form Won't Load
    By suburbanght in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-11-2007, 05:23 PM
  4. Load form when workbook opens
    By melton9@hotmail.com in forum Excel General
    Replies: 2
    Last Post: 07-18-2006, 10:35 PM
  5. Call Event and Load Form based on Variable
    By Resant in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2006, 10:15 AM

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