Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Is there code to create a new WorkSheet in a WorkBook and have it a duplicate of another WorkSheet ? Is there a limit to how many WorkSheets can be in a WorkBook ? Over time there may be 10,000 sheets needed. I have a costing sheet that i want to set up, but want to be able to search through all records to find specific values in a costing sheet. Is there a formula to search through ALL WorkSheets in the selected cell for values that match, and to ONLY display those WorkSheets ? I want to place a Button on the 1st WorkSheet and IF clicked, it creates a New WorkSheet COPY of the Costing Sheet template. How would i go about this? Corey.... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is limited by memory.
Putting 10000 sheets in a workbook would not be very smart in my opinion. Excel workbooks can get corrupted and then all your data could be lost. Limit it to some reasonable number (less than 100 I would think) and have multiple workbooks. Make backup copies of each. With Activeworkbook .worksheets("Sheet1").Copy After:=.Worksheets(.Worksheets.count) End With -- Regards, Tom Ogilvy "Corey" wrote in message ... Is there code to create a new WorkSheet in a WorkBook and have it a duplicate of another WorkSheet ? Is there a limit to how many WorkSheets can be in a WorkBook ? Over time there may be 10,000 sheets needed. I have a costing sheet that i want to set up, but want to be able to search through all records to find specific values in a costing sheet. Is there a formula to search through ALL WorkSheets in the selected cell for values that match, and to ONLY display those WorkSheets ? I want to place a Button on the 1st WorkSheet and IF clicked, it creates a New WorkSheet COPY of the Costing Sheet template. How would i go about this? Corey.... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks for the reply Tom. Also thatks for the advice on the file size. Is there a step i can add to this to Re-Name the Sheet a value from a Msg Box, Instaed of (Sheet1.2.3.4.5 ets) ? Corey.... "Tom Ogilvy" wrote in message ... It is limited by memory. Putting 10000 sheets in a workbook would not be very smart in my opinion. Excel workbooks can get corrupted and then all your data could be lost. Limit it to some reasonable number (less than 100 I would think) and have multiple workbooks. Make backup copies of each. With Activeworkbook .worksheets("Sheet1").Copy After:=.Worksheets(.Worksheets.count) End With -- Regards, Tom Ogilvy "Corey" wrote in message ... Is there code to create a new WorkSheet in a WorkBook and have it a duplicate of another WorkSheet ? Is there a limit to how many WorkSheets can be in a WorkBook ? Over time there may be 10,000 sheets needed. I have a costing sheet that i want to set up, but want to be able to search through all records to find specific values in a costing sheet. Is there a formula to search through ALL WorkSheets in the selected cell for values that match, and to ONLY display those WorkSheets ? I want to place a Button on the 1st WorkSheet and IF clicked, it creates a New WorkSheet COPY of the Costing Sheet template. How would i go about this? Corey.... |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dim sh as Worksheet Dim msg as String, sName as String msg ="Enter a sheet name (no special characters)" do sname = InputBox(msg) if sname = "" then exit sub On error resume Next set sh = worksheets(sName) on error goto 0 msg = "Name already exists, try again: " loop while not sh is nothing With Activeworkbook .worksheets("Sheet1").Copy After:=.Worksheets(.Worksheets.count) End With Activesheet.Name = fname -- Regards, Tom Ogilvy "Corey" wrote in message ... Thanks for the reply Tom. Also thatks for the advice on the file size. Is there a step i can add to this to Re-Name the Sheet a value from a Msg Box, Instaed of (Sheet1.2.3.4.5 ets) ? Corey.... "Tom Ogilvy" wrote in message ... It is limited by memory. Putting 10000 sheets in a workbook would not be very smart in my opinion. Excel workbooks can get corrupted and then all your data could be lost. Limit it to some reasonable number (less than 100 I would think) and have multiple workbooks. Make backup copies of each. With Activeworkbook .worksheets("Sheet1").Copy After:=.Worksheets(.Worksheets.count) End With -- Regards, Tom Ogilvy "Corey" wrote in message ... Is there code to create a new WorkSheet in a WorkBook and have it a duplicate of another WorkSheet ? Is there a limit to how many WorkSheets can be in a WorkBook ? Over time there may be 10,000 sheets needed. I have a costing sheet that i want to set up, but want to be able to search through all records to find specific values in a costing sheet. Is there a formula to search through ALL WorkSheets in the selected cell for values that match, and to ONLY display those WorkSheets ? I want to place a Button on the 1st WorkSheet and IF clicked, it creates a New WorkSheet COPY of the Costing Sheet template. How would i go about this? Corey.... |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks again Tom.
Worked like a gem. Corey.... "Tom Ogilvy" wrote in message ... Dim sh as Worksheet Dim msg as String, sName as String msg ="Enter a sheet name (no special characters)" do sname = InputBox(msg) if sname = "" then exit sub On error resume Next set sh = worksheets(sName) on error goto 0 msg = "Name already exists, try again: " loop while not sh is nothing With Activeworkbook .worksheets("Sheet1").Copy After:=.Worksheets(.Worksheets.count) End With Activesheet.Name = sName -- Regards, Tom Ogilvy "Corey" wrote in message ... Thanks for the reply Tom. Also thatks for the advice on the file size. Is there a step i can add to this to Re-Name the Sheet a value from a Msg Box, Instaed of (Sheet1.2.3.4.5 ets) ? Corey.... "Tom Ogilvy" wrote in message ... It is limited by memory. Putting 10000 sheets in a workbook would not be very smart in my opinion. Excel workbooks can get corrupted and then all your data could be lost. Limit it to some reasonable number (less than 100 I would think) and have multiple workbooks. Make backup copies of each. With Activeworkbook .worksheets("Sheet1").Copy After:=.Worksheets(.Worksheets.count) End With -- Regards, Tom Ogilvy "Corey" wrote in message ... Is there code to create a new WorkSheet in a WorkBook and have it a duplicate of another WorkSheet ? Is there a limit to how many WorkSheets can be in a WorkBook ? Over time there may be 10,000 sheets needed. I have a costing sheet that i want to set up, but want to be able to search through all records to find specific values in a costing sheet. Is there a formula to search through ALL WorkSheets in the selected cell for values that match, and to ONLY display those WorkSheets ? I want to place a Button on the 1st WorkSheet and IF clicked, it creates a New WorkSheet COPY of the Costing Sheet template. How would i go about this? Corey.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create a form to insert a hyerlink.VBA code to create a for | Excel Discussion (Misc queries) | |||
Code Conflicts With Worksheet Change Code | Excel Programming | |||
Create a newworksheet with VBA code and put VBA code in the new worksheet module | Excel Programming | |||
Altering code to reference the worksheet before the active worksheet | Excel Programming | |||
Return to previous worksheet after code pastes in another worksheet? | Excel Programming |