PC Review


Reply
Thread Tools Rate Thread

Change row height

 
 
bergjes
Guest
Posts: n/a
 
      28th Dec 2006
Hi,
I'm a newbie with excel programming, but can somebody help me with the
following.

I have a rather large worksheet from wich I have to change the row
height to 15, but only the rows that have a height of 13.75.

Is there anyway I can do that with a macro or vsb?

Thanks,
Erik

 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      28th Dec 2006
You can test the row height as well as set it, so try this.......

Sub RowH()
With Sheets("Sheet1").UsedRange
If .RowHeight = 13.75 Then .RowHeight = 15
End With
End Sub
--
Cheers
Nigel



"bergjes" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> I'm a newbie with excel programming, but can somebody help me with the
> following.
>
> I have a rather large worksheet from wich I have to change the row
> height to 15, but only the rows that have a height of 13.75.
>
> Is there anyway I can do that with a macro or vsb?
>
> Thanks,
> Erik
>



 
Reply With Quote
 
=?Utf-8?B?Sm9obiBCdW5keQ==?=
Guest
Posts: n/a
 
      28th Dec 2006
Here you go, please note that if there are a lot then this could take some
time. If you could narrow the area to do this to it would speed it up.
Sub main()
myrow = 1
Do Until myrow = Cells(Rows.Count, "A").End(xlDown).Row
If Rows(myrow).RowHeight = 13.75 Then Rows(myrow).RowHeight = 15
myrow = myrow + 1
Loop
End Sub

--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"bergjes" wrote:

> Hi,
> I'm a newbie with excel programming, but can somebody help me with the
> following.
>
> I have a rather large worksheet from wich I have to change the row
> height to 15, but only the rows that have a height of 13.75.
>
> Is there anyway I can do that with a macro or vsb?
>
> Thanks,
> Erik
>
>

 
Reply With Quote
 
=?Utf-8?B?Sm9obiBCdW5keQ==?=
Guest
Posts: n/a
 
      28th Dec 2006
Forgot to mention that this formats the entire page, if you just want to go
until there is no more data change the column that contains the data and the
line given to xlUp like this
Do Until myrow = Cells(Rows.Count, "C").End(xlUp).Row
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"bergjes" wrote:

> Hi,
> I'm a newbie with excel programming, but can somebody help me with the
> following.
>
> I have a rather large worksheet from wich I have to change the row
> height to 15, but only the rows that have a height of 13.75.
>
> Is there anyway I can do that with a macro or vsb?
>
> Thanks,
> Erik
>
>

 
Reply With Quote
 
bergjes
Guest
Posts: n/a
 
      28th Dec 2006
Thanks John,

works great!!!!

Just a little remark, your macro left out the last row with data.
But hé, it works for me, thanks again.

Erik



John Bundy schreef:

> Forgot to mention that this formats the entire page, if you just want to go
> until there is no more data change the column that contains the data and the
> line given to xlUp like this
> Do Until myrow = Cells(Rows.Count, "C").End(xlUp).Row
> --
> -John Northwest11
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
> "bergjes" wrote:
>
> > Hi,
> > I'm a newbie with excel programming, but can somebody help me with the
> > following.
> >
> > I have a rather large worksheet from wich I have to change the row
> > height to 15, but only the rows that have a height of 13.75.
> >
> > Is there anyway I can do that with a macro or vsb?
> >
> > Thanks,
> > Erik
> >
> >


 
Reply With Quote
 
bergjes
Guest
Posts: n/a
 
      28th Dec 2006
Hi Nigel,

Thanks for your response, but I can't get it working.
The solution from John works great, but i'm just curious if your
solution works as well.

If I put your code into my sheet, nothing happens.

Did it work for you?

Erik


Nigel schreef:

> You can test the row height as well as set it, so try this.......
>
> Sub RowH()
> With Sheets("Sheet1").UsedRange
> If .RowHeight = 13.75 Then .RowHeight = 15
> End With
> End Sub
> --
> Cheers
> Nigel
>
>
>
> "bergjes" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> > I'm a newbie with excel programming, but can somebody help me with the
> > following.
> >
> > I have a rather large worksheet from wich I have to change the row
> > height to 15, but only the rows that have a height of 13.75.
> >
> > Is there anyway I can do that with a macro or vsb?
> >
> > Thanks,
> > Erik
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change row' height =?Utf-8?B?Y2hhY2NoZXQ=?= Microsoft Excel New Users 2 6th Jan 2007 11:19 PM
Change height of row =?Utf-8?B?UGFtIE1hY1Q=?= Microsoft Excel Misc 2 5th Jan 2005 01:54 AM
How to change row height in a DataGrid Tor Inge Rislaa Microsoft VB .NET 1 20th May 2004 07:27 PM
taskbar height doubled - can't change back to normal height Lyn Windows XP General 2 20th Oct 2003 11:52 AM
How to change the height of a ComboBox? vbel Microsoft Dot NET Framework Forms 4 18th Jul 2003 09:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:54 AM.