Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Curiosity
So just a thought. I am making an estimating program/spreasheet. Now there
can be one or more phases to a project and I was wondering is there anyway so that when this workbook is opened to be asked for the amount of phases and then automatically create that many copies of the master sheet and then add their to totals to a totals sheet. Or is this far to crazy to be done without years of computer programming. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Curiosity
Something like the following may do what you want:
Sub Auto_Open() Dim N As Long Dim M As Long N = Application.InputBox(prompt:="Number Of Phases", Type:=1) If N 0 Then With ThisWorkbook.Worksheets For M = 1 To N .Item("Master").Copy after:=.Item(.Count) .Item(.Count).Name = "Phase " & CStr(M) Next M End With End If End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Excluxe" wrote in message ... So just a thought. I am making an estimating program/spreasheet. Now there can be one or more phases to a project and I was wondering is there anyway so that when this workbook is opened to be asked for the amount of phases and then automatically create that many copies of the master sheet and then add their to totals to a totals sheet. Or is this far to crazy to be done without years of computer programming. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Curiosity
So i think it might want to work something poped about macros and security
aslo i am new to this code part of excell so i really don't have a clue want exactly to do with this formula. I entered it in the code part of excell hence getting the thing about macros. The sheet I need to duplicate is HVAC PRICING. I am assuming I need to place this in the formula but quite no where. Appreciate any help you can give me thanks. P.S. Oh yeah and technical jargon just dumbed down a little is fine. I have played with this stuff but not since I was 9-10 so I remember little if anything. Thanks "Chip Pearson" wrote: Something like the following may do what you want: Sub Auto_Open() Dim N As Long Dim M As Long N = Application.InputBox(prompt:="Number Of Phases", Type:=1) If N 0 Then With ThisWorkbook.Worksheets For M = 1 To N .Item("Master").Copy after:=.Item(.Count) .Item(.Count).Name = "Phase " & CStr(M) Next M End With End If End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Excluxe" wrote in message ... So just a thought. I am making an estimating program/spreasheet. Now there can be one or more phases to a project and I was wondering is there anyway so that when this workbook is opened to be asked for the amount of phases and then automatically create that many copies of the master sheet and then add their to totals to a totals sheet. Or is this far to crazy to be done without years of computer programming. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 12, er, 2007 - Semi-idle Curiosity | Excel Worksheet Functions | |||
MegaFormula curiosity | Excel Worksheet Functions | |||
Public Curiosity | Excel Discussion (Misc queries) |