Last row in table resizes after new row inserted at top

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,832
Office Version
  1. 2007
Platform
  1. Windows
My worksheet rows height are all set at 25
I have a userform where i enter value then i send thos values to the worksheet.
A new row is inserted into row 2 & i then notice that the last row with values in my table resizes itself from 25 to 15

If i open the userform & do the same again i then see the next row up at the bottom of the table also resize itself to 15

The code i sue is shown below.

Can you advise why & how to fix the issue.

Many Thanks

VBA Code:
Private Sub SendToWorksheet_Click()
    ActiveSheet.ListObjects("Table42").ListRows.Add 1, True
    Rows(2).RowHeight = 25
    
    
    ThisWorkbook.Worksheets("QUOTES").Range("D2") = Me.ComboBox1.Text ' VEHICLE
    ThisWorkbook.Worksheets("QUOTES").Range("H2") = Me.ComboBox2.Text ' DESCRIPTION OF JOB
    ThisWorkbook.Worksheets("QUOTES").Range("K2") = Me.ComboBox3.Text ' PAYMENT
    ThisWorkbook.Worksheets("QUOTES").Range("A2") = Me.TextBox1.Text ' NAME
    ThisWorkbook.Worksheets("QUOTES").Range("B2") = Me.TextBox2.Text ' TELEPHONE
    ThisWorkbook.Worksheets("QUOTES").Range("C2") = Me.TextBox3.Text ' POST CODE
    ThisWorkbook.Worksheets("QUOTES").Range("E2") = Me.TextBox4.Text ' VEHICLE REG
    ThisWorkbook.Worksheets("QUOTES").Range("F2") = Me.TextBox5.Text ' QUOTED
    ThisWorkbook.Worksheets("QUOTES").Range("G2") = Me.TextBox6.Text ' DATE OF QUOTE
    ThisWorkbook.Worksheets("QUOTES").Range("I2") = Me.TextBox7.Text ' MILE THERE & BACK
    ThisWorkbook.Worksheets("QUOTES").Range("J2") = Me.TextBox8.Text ' VIN
  
    Unload QuotesForm
End Sub
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
A dirty way to get me buy at present is t o use this

VBA Code:
Rows("2:200").RowHeight = 25
 
Upvote 0
VBA Code:
Private Sub SendToWorksheet_Click()
    ' insert new listrow 1
    ActiveSheet.ListObjects("Table42").ListRows.Add 1, True
    ' set row height for all listrows
    ActiveSheet.ListObjects("Table42").DataBodyRange.RowHeight = 25
    
    '
    '
 
Upvote 0
Solution

Forum statistics

Threads
1,224,808
Messages
6,181,072
Members
453,020
Latest member
mattg2448

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