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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

drhatmrexcel

Board Regular
Joined
Oct 30, 2009
Messages
69
Right click it and see if it set to move and size with cells, if so uncheck and see if that solves your problem.
 
Upvote 0

Nalani

Well-known Member
Joined
Apr 10, 2009
Messages
1,047
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

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,350
ADVERTISEMENT
have you tried adding a
Code:
UserForm1.Repaint
 
Upvote 0

Nalani

Well-known Member
Joined
Apr 10, 2009
Messages
1,047
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

Nalani

Well-known Member
Joined
Apr 10, 2009
Messages
1,047
ADVERTISEMENT
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

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
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,195,849
Messages
6,011,957
Members
441,657
Latest member
Diupsy

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
Top