Help! textbox height can't even be manually changed!!!!

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
I have tried everything to get my textbox1 to be a certain height. As you can see, I even just plugged in a big number (1600) just to see what would happen. NOTHING HAPPENS. The size of the box doesn't change no matter what I do.

Is there something really stupid on my part going on?

Gene Klein



Code:
 .TextBox1.Top = 30
         .TextBox2.Top = 30
         MsgBox .TextBox30.Top
         MsgBox .TextBox1.Top
         MsgBox .TextBox30.Height
         '.TextBox1.Height = .TextBox30.Top - .TextBox1.Top + .TextBox30.Height
         .TextBox1.Height = TextBox30.Top + TextBox30.Height
          MsgBox TextBox1.Height
        TextBox1.Height = 1600
      
        .TextBox2.Height = TextBox1.Height
        .TextBox14.Height = TextBox1.Height
   
        .TextBox4.Visible = False
        .TextBox5.Visible = False
        .TextBox6.Visible = False
        .TextBox7.Visible = False
        .TextBox9.Visible = False
        .TextBox11.Visible = False
        .TextBox12.Visible = False
        .TextBox15.Visible = False
        .TextBox16.Visible = False
        .TextBox17.Visible = False
        .TextBox18.Visible = False
        .TextBox19.Visible = False
        .TextBox20.Visible = False
        .TextBox21.Visible = False
End With
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I'm assuming this is a Textbox on a UserForm.

Looks like you're missing a .

I tested with this:

Rich (BB code):
Private Sub UserForm_Click()
    With Me
        .TextBox1.Top = 30
        MsgBox .TextBox1.Top
        .TextBox1.Height = 160
    End With
End Sub

Works for me ;)
 
Upvote 0
I just reread you post and see that you were trying to add the values of Top & Height of TB30 to get the height of TB1.

I tried this and it also works for me.
Code:
Private Sub UserForm_Click()
    With Me
        .TextBox1.Top = 30
        MsgBox .TextBox1.Top
        .TextBox1.Height = TextBox30.Top + TextBox30.Height
      '  .TextBox1.Height = 160
    End With
End Sub

Of course it only works when the UserForm is active. If you are trying to adjust TB1 in the VBE, that is another issue. Not sure what you want to accomplish.
 
Upvote 0
Okay... Just took another Re-Read and see in your Title:

Help! textbox height can't even be manually changed!!!!

First of all is it a Worksheet or UserForm Textbox?

What exactly have you tried manually to change it? (without code)
 
Upvote 0
I'm assuming this is a Textbox on a UserForm.

Looks like you're missing a .

I tested with this:

Rich (BB code):
Private Sub UserForm_Click()
    With Me
        .TextBox1.Top = 30
        MsgBox .TextBox1.Top
       .TextBox1.Height = 160
    End With
End Sub

Works for me ;)
That stupidity was clearly part of my problem.

Gene Klein
 
Upvote 0

Forum statistics

Threads
1,222,175
Messages
6,164,398
Members
451,890
Latest member
JamieS

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top