Consulting

Results 1 to 7 of 7

Thread: Creating and displaying 16 frames on a userform each frame two labels.

  1. #1
    VBAX Newbie
    Joined
    Sep 2016
    Posts
    3
    Location

    Creating and displaying 16 frames on a userform each frame two labels.

    i would like to create 16 frames on a userform, each frame containing two labels. each frame and the labels will be randomly assigned to one of the cells in a 4x4 cell range. the userform will display one frame and its contents at a time when the correct name of the frame is provided in the cell it is assigned to and a "SUBMIT" button in the excel page is pressed.

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Can you attach a workbook with your layout and the desired results?

  3. #3
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    I'm a bit curious about the intended user interaction.

    Since this was posted in the Mac sub-forum, I'm assuming that you are using a Mac and don't have modless user forms available.

    It sounds like you have a sheet with a 4X4 designated range (H1:K4 for this example)

    You also have a user form with 16 frames.

    You want to randomly assign each frame to one of those cells (but not put the frame name in the cells)

    On the worksheet, you have a SUBMIT button.

    The user will type names of frames into the 16 cells and press SUBMIT.
    The Userform will appear.
    Only those frames that have been correctly matched with their (randomly assigned) cells will be shown.

    Am I correct so far?

    In any case, it sounds like you will also need a START button on the sheet, so that the "randomly assign frames with cells" can be run.

    (This almost sounds like a simulation for a Big Brother competition. (No spoilers, I haven't seen the finale yet) )

  4. #4
    VBAX Newbie
    Joined
    Sep 2016
    Posts
    3
    Location
    Quote Originally Posted by mikerickson View Post
    I'm a bit curious about the intended user interaction.

    Since this was posted in the Mac sub-forum, I'm assuming that you are using a Mac and don't have modless user forms available.

    It sounds like you have a sheet with a 4X4 designated range (H1:K4 for this example)

    ***You also have a user form with 16 frames.

    You want to randomly assign each frame to one of those cells (but not put the frame name in the cells)

    On the worksheet, you have a SUBMIT button.

    The user will type names of frames into the 16 cells and press SUBMIT.
    The Userform will appear.
    Only those frames that have been correctly matched with their (randomly assigned) cells will be shown.

    Am I correct so far?

    In any case, it sounds like you will also need a START button on the sheet, so that the "randomly assign frames with cells" can be run.

    (This almost sounds like a simulation for a Big Brother competition. (No spoilers, I haven't seen the finale yet) )
    Josaah

    You're right.
    ***Each entry may be made and submitted so that the corresponding frame appears (in which case the next one replaces the first one so that at any given time only one frame is present [that is my original plan]). But it is also possible that the 16 frames will all be placed on the frame to appear one after the other and remain until all of them appear.

    i have been trying to work on this project and i hereby present what i have so far done. but i want to write everything in VBA code from scratch considering the number of frames i have to deal with.

    i could have worked the project out if i could handle the frames but piling 16 frames one on the other and working with them was difficult.

    coding it will reduce the workload.

    run from the developer code to see how it will appear
    Attached Files Attached Files

  5. #5
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    I'm confused about a few things.

    1) I still don't understand what the user interface will be. the "one at a time" thing puzzles me.
    2) You are posting in the Mac forum, but your code uses windows file path separators, /, rather than Mac's :
    3) It sounds like you have LoadPicuture working, which doesn't happen with Mac's.

    Rather than making controls at run-time, it would be best if you just set up one frame and its internal controls so that its working and looking the way that you want to. Then select that frame and use the VBEditor Copy and paste feature to make 15 duplicates of it.

    I'm also thinking that if you were to make a frame and its associated controls a custom object (class module) you could add Properties that would make handling those frames easier.

  6. #6
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    I'm going to move this thread to the general Excel section.
    LoadPicture does not work on Macs, and it appears that that will be a big feature of your user form, so I'll put this where people can help you.

  7. #7
    VBAX Newbie
    Joined
    Sep 2016
    Posts
    3
    Location

    Thanks. This is not meant for mac.

    Quote Originally Posted by mikerickson View Post
    I'm going to move this thread to the general Excel section.
    LoadPicture does not work on Macs, and it appears that that will be a big feature of your user form, so I'll put this where people can help you.
    Josaah
    This work is for windows excel so moving it to the appropriate forum will help a lot. Thanks

Posting Permissions

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