![]() |
Creating new worksheets in a workbook....with a twist
I am currently trying to create somthing, I dont even know if excel i capable of doing it however. Basically I have a main page (Sheet 1) with a list in Column A wit building sites. Currently it goes from A10-32. Now each of thes currently has another worksheet within the workbook attached to it, an the information in row 10 is displayed in that workbook. Is there a way in excel to create somthing so that when I add a nam into cell A33 that it automatically creates a new Worksheet with title of what is written in that cell -- londa ----------------------------------------------------------------------- londar's Profile: http://www.excelforum.com/member.php...fo&userid=3297 View this thread: http://www.excelforum.com/showthread.php?threadid=56072 |
Creating new worksheets in a workbook....with a twist
Sheets("Sheet1").activate
Range("A33").activate x = Activecell ActiveWorkbook.Worksheets.Add After:=ActiveSheet Activesheet.name = x -- Best wishes, Jim "londar" wrote: I am currently trying to create somthing, I dont even know if excel is capable of doing it however. Basically I have a main page (Sheet 1) with a list in Column A with building sites. Currently it goes from A10-32. Now each of these currently has another worksheet within the workbook attached to it, and the information in row 10 is displayed in that workbook. Is there a way in excel to create somthing so that when I add a name into cell A33 that it automatically creates a new Worksheet with a title of what is written in that cell? -- londar ------------------------------------------------------------------------ londar's Profile: http://www.excelforum.com/member.php...o&userid=32970 View this thread: http://www.excelforum.com/showthread...hreadid=560726 |
Creating new worksheets in a workbook....with a twist
You could use the worsheet_change event like so: Private Sub Worksheet_Change(ByVal Target As Excel.Range) if target.currentregion.rows.count worksheets.count - 1 then worksheets.add after:=worksheets(worksheets.count) activesheet.name = target.value end if End Sub Col -- colofnature ------------------------------------------------------------------------ colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356 View this thread: http://www.excelforum.com/showthread...hreadid=560726 |
Creating new worksheets in a workbook....with a twist
This example will select the next empty cell for the name to be inserted and
then add the sheet and name it. Workbooks("Yourwbkname.xls").Activate With Sheets("Sheet1") Set rng = .Range(.Cells(1, 1), .Cells(1, 1)).End(xlDown) rng.Select ActiveCell.Offset(1, 0).Activate If inputbox("Type the new name") = vbcancel then end sub else end if x = Activecell ActiveWorkbook.Worksheets.Add After:=ActiveSheet Activesheet.name = x End With -- Best wishes, Jim "londar" wrote: I am currently trying to create somthing, I dont even know if excel is capable of doing it however. Basically I have a main page (Sheet 1) with a list in Column A with building sites. Currently it goes from A10-32. Now each of these currently has another worksheet within the workbook attached to it, and the information in row 10 is displayed in that workbook. Is there a way in excel to create somthing so that when I add a name into cell A33 that it automatically creates a new Worksheet with a title of what is written in that cell? -- londar ------------------------------------------------------------------------ londar's Profile: http://www.excelforum.com/member.php...o&userid=32970 View this thread: http://www.excelforum.com/showthread...hreadid=560726 |
All times are GMT +1. The time now is 10:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com