Increase and decrease the row height

  • Thread starter Thread starter purplemx
  • Start date Start date
P

purplemx

Hi

i have a file and i try to find a macro to increase the height of the row
with a button
and also other one to decrease the height.

On every single must to increase the height 5 by 5 size.

I hope is clear my question...

Any one can help me.
 
purplemx said:
Hi

i have a file and i try to find a macro to increase the height of the row
with a button
and also other one to decrease the height.

On every single must to increase the height 5 by 5 size.

I hope is clear my question...

Any one can help me.

-------------

Have you tried to record a macro while you do what you want manually, then go in
and look at the VBA created by the macro recorder?

Bill
 
Hi Purplemx.

Try:

'=============>>
Private Sub CommandButton1_Click()
With ActiveCell
..RowHeight = .RowHeight + 5
End With
End Sub
'<<=============


'=============>>
Private Sub CommandButton2_Click()
With ActiveCell
..RowHeight = .RowHeight - 5
End With
End Sub
'<<=============
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top