+ Reply to Thread
Results 1 to 8 of 8

Change userform label height without changing label width

Hybrid View

  1. #1
    Forum Contributor vamosj's Avatar
    Join Date
    04-23-2004
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    294

    Re: Change userform label height without changing label width

    Quote Originally Posted by MarvinP View Post
    I'm having trouble dealing with the magic to get a real answer.
    Is this due to not understanding me (I can sometimes be a bit unclear sometimes I guess) or having a problem figuring out a solution?


    If it is a misunderstanding, the PMCode is not set anywhere else in the subroutine. I put it there as an example of what I was trying to do.

    Let me try doing it this way.


    Sub ChgLblSize ()
    
    AccessChange.EmailBody.Caption = DICEmailBody.Item(i)
    AccessChange.EmailBody.Width = 250
    PMCode = AccessChange.EmailBody.Height.Autosize 
    'I know this is not the syntax, but I want PMCode to give the "EmailBody" label a height to fit the dynamic caption without 
    'being too big or too small and without changing the width.
    
    
    If AccessChange.Width < 700 Then
        AccessChange.EmailBody.Height = PMCode
        AccessChange.EmailFrame.ScrollHeight = AccessChange.EmailBody.Height
        AccessChange.Width = 875
    Else
        AccessChange.Width = 565
    End If
    
    End Sub
    Last edited by vamosj; 04-16-2015 at 01:10 PM. Reason: formatting
    Janos S. Vamos
    Data Systems Technician/Fire Controlman PO1(SW/AW)
    US Navy Retired


    Remember, Record Macro can be your friend for figuring out solutions.

    Good or Bad, let me know how I did by clicking on the "Add Reputation" * just to the lower left of here. it only takes a few seconds to let someone know.

+ 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. With a move label macro, prevent label from moving onto another label
    By SocratesJC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2014, 12:34 AM
  2. Dyanmically changing userform's label based on total time elpased (please help!!!!)
    By bhattarainemi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-07-2014, 11:23 PM
  3. [SOLVED] changing userform label control's color dynamically
    By Ouka in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2014, 02:26 AM
  4. To Change a Userform Label
    By COJCI in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2011, 06:50 PM
  5. Changing label caption in a Userform to an opterator value
    By jumpjump in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2005, 08:50 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