Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following are the simple few lines of code to adjust
the height of rows when user clicks the "Adjust Rows" button. I keep on getting a run-time error "1004" saying AutFit method of Range class failed. Can someone please tell me where it fails ? PS: The column contains data need adjust is Column D with with more than 999 rows of data. Private sub Adjust_Rows_Click() Dim Rows as Integer Rows = ActiveSheet.Range("D999").End(xlUp).Row ActiveSheet.Range("D4:D"+Cstr(Rows)).Rows.AutoFit End Sub Thanks in advance for any help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofill method of range class failed | Excel Discussion (Misc queries) | |||
Autofill method of range class failed | Excel Discussion (Misc queries) | |||
Run-time error '1004' PasteSpecial Method of Range Class Failed | Excel Programming | |||
VB Error: Paste Special method of range class failed | Excel Programming | |||
error 1004 Select method of Range class failed | Excel Programming |