![]() |
Increasing the width/height of cells programatically
Hi,
I have made an Excel VBA application where new sheets are automaticall added on button click. I wanted to know how one can change the name o the new excel sheet created and more importantly how does one chang the width and height of cells in the new sheet. Thanks, Samee -- Message posted from http://www.ExcelForum.com |
Increasing the width/height of cells programatically
Hi Sameer
Try and use the macro recorder. Here's a sample code though: Sheets.Add ActiveSheet.Name = "Sheet11" Rows("2:2").RowHeight = 20 Columns("B:B").ColumnWidth = 20 HTH Cordially Pascal "sameerce " a écrit dans le message de ... Hi, I have made an Excel VBA application where new sheets are automatically added on button click. I wanted to know how one can change the name of the new excel sheet created and more importantly how does one change the width and height of cells in the new sheet. Thanks, Sameer --- Message posted from http://www.ExcelForum.com/ |
Increasing the width/height of cells programatically
Try the following to change the whole worksheet column width and row heights
Sheets("Sheet1").Name = "YourName" Cells.ColumnWidth = 15.5 Cells.RowHeight = 25.5 Cheers Nigel "sameerce " wrote in message ... Hi, I have made an Excel VBA application where new sheets are automatically added on button click. I wanted to know how one can change the name of the new excel sheet created and more importantly how does one change the width and height of cells in the new sheet. Thanks, Sameer --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 12:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com