+ Reply to Thread
Results 1 to 9 of 9

Invisible form, visible controls

  1. #1
    Registered User
    Join Date
    04-29-2016
    Location
    Portugal
    MS-Off Ver
    2007
    Posts
    43

    Invisible form, visible controls

    There are posts everywhere about this but non have a code that works. The most I got was some code to make the form and the controls invisible.
    If I could put the controls without a form I wouldn't even need this but I can't, so, how do I do it?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,214

    Re: Invisible form, visible controls

    I can't make any sense of this question. What do you want to do?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    04-29-2016
    Location
    Portugal
    MS-Off Ver
    2007
    Posts
    43

    Re: Invisible form, visible controls

    I wanna have a invisible UserForm so that the only thing the user can see is the controls (buttons, mutipages, wharever). Got it?

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Invisible form, visible controls

    You don't, at least not with VBA userforms and controls.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,214

    Re: Invisible form, visible controls

    It is possible but it's a little complicated. There is no built-in transparency for UserForms. You have to make Windows API calls to directly modify the Window.

    I have tried the code at this link and it seems to work but it is not my code, I can't support it, and I can't vouch for how it will behave in different circumstances.

  6. #6
    Registered User
    Join Date
    04-29-2016
    Location
    Portugal
    MS-Off Ver
    2007
    Posts
    43

    Re: Invisible form, visible controls

    I'm not sure if I put the first code on a Class Module called CFormSkin and the other code on the UserForm's code. I tried that way and it gave me error in the Me.cmdExit
    I'm using Microsoft Office Excel 2007.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,214

    Re: Invisible form, visible controls

    You have the code in the right place.

    cmdExit is the name of a CommandButton on the form that is intended to cancel the operation of the form. The more conventional label is Cancel. You probably have such a button--modify this line of code to use the name of your actual button.

  8. #8
    Registered User
    Join Date
    04-29-2016
    Location
    Portugal
    MS-Off Ver
    2007
    Posts
    43

    Re: Invisible form, visible controls

    Quote Originally Posted by 6StringJazzer View Post
    You have the code in the right place.

    cmdExit is the name of a CommandButton on the form that is intended to cancel the operation of the form. The more conventional label is Cancel. You probably have such a button--modify this line of code to use the name of your actual button.
    Well, it worked. It takes a little to show the controls and the cmdExit commandbutton turns yellow but it worked. Thanks!

    For any other viewers: Insert a Class Module and name it CFormSkin. Then insert a UserForm with a CommandButton named cmdExit. Add the big code to the Class Module and the small code (at the end of the link 6StringJazzer gave) to the UserForm.

    I guess this is what makes it take a little:
    Please Login or Register  to view this content.
    and I noticed the color
    Please Login or Register  to view this content.
    is kind of the transparency key.
    Last edited by rdrmdr; 05-06-2016 at 05:04 AM.

  9. #9
    Registered User
    Join Date
    01-17-2012
    Location
    haiti
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Invisible form, visible controls

    Hi, rdrmdr user!

    please post the workbook with your new code of skins working?

    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. Invisible and/or Visible Picture
    By cyee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-04-2014, 02:04 AM
  2. Replies: 1
    Last Post: 05-01-2014, 05:15 PM
  3. [SOLVED] How to make invisible application visible again?
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-29-2013, 07:10 PM
  4. Buttons visible/Invisible
    By LisaPatch in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2011, 11:36 AM
  5. Row Visible / Invisible
    By RoyMakaay1985 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2009, 06:00 AM
  6. Make charts visible / invisible
    By Jerome_Singapore in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-16-2009, 06:24 AM
  7. invisible text boxes becoming visible
    By Jordan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2005, 08:06 PM

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